diff options
author | Cory Wright <cory.wright@rackspace.com> | 2010-12-20 18:15:40 -0500 |
---|---|---|
committer | Cory Wright <cory.wright@rackspace.com> | 2010-12-20 18:15:40 -0500 |
commit | 1b47ef95fff4d8419e27a7cc247178806cc065ff (patch) | |
tree | f4b481f4777c4a5f3772074b6071a54234c17b9b | |
parent | 63d9378bccf5500e96037956f07618e86c5d38eb (diff) | |
download | nova-1b47ef95fff4d8419e27a7cc247178806cc065ff.tar.gz |
Close devnull filehandle
-rwxr-xr-x | plugins/xenserver/networking/etc/xensource/scripts/vif_rules.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/xenserver/networking/etc/xensource/scripts/vif_rules.py b/plugins/xenserver/networking/etc/xensource/scripts/vif_rules.py index dd27d3c6b7..d60816ce76 100755 --- a/plugins/xenserver/networking/etc/xensource/scripts/vif_rules.py +++ b/plugins/xenserver/networking/etc/xensource/scripts/vif_rules.py @@ -17,8 +17,8 @@ # under the License. """ -This script is used to configure iptables, ebtables, and arptables rules for -XenServer instances. +This script is used to configure iptables, ebtables, and arptables rules on +XenServer hosts. """ import os @@ -55,6 +55,7 @@ def execute(command, return_stdout=False): devnull = open(os.devnull, 'w') proc = subprocess.Popen(command, shell=True, close_fds=True, stdout=subprocess.PIPE, stderr=devnull) + devnull.close() if return_stdout: return proc.stdout.read() else: |