From 099add4fd6d4af309875b6b41a6d8b782f58649c Mon Sep 17 00:00:00 2001 From: wilderrodrigues Date: Thu, 20 Nov 2014 08:05:43 +0100 Subject: [PATCH] Removing "global" declaration from if block In python an "if" block doesn't change the scope. So, global not needed as it was creating an warning. --- systemvm/patches/debian/config/opt/cloud/bin/baremetal-vr.py | 1 - 1 file changed, 1 deletion(-) diff --git a/systemvm/patches/debian/config/opt/cloud/bin/baremetal-vr.py b/systemvm/patches/debian/config/opt/cloud/bin/baremetal-vr.py index 9cce6393fd2..51ab5822353 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/baremetal-vr.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/baremetal-vr.py @@ -156,7 +156,6 @@ def notify_provisioning_done(mac): if __name__ == '__main__': - global server server = Server() shell("iptables-save | grep -- '-A INPUT -i eth0 -p tcp -m tcp --dport 10086 -j ACCEPT' > /dev/null || iptables -I INPUT -i eth0 -p tcp -m tcp --dport 10086 -j ACCEPT") app.run(host='0.0.0.0', port=10086, debug=True)