summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuannan Ren <gren@redhat.com>2013-02-28 18:03:46 +0800
committerGuannan Ren <gren@redhat.com>2013-03-01 15:49:07 +0800
commit71697db2035db9ebda84b6404d35a89e96bfc9a2 (patch)
treedce8c0b17cb3fb14a1ac5b7cdc37641720651ff6
parentf88b551eeb83bee53eff9b59684a36b1cdcb2cf0 (diff)
downloadlibvirt-python-split-71697db2035db9ebda84b6404d35a89e96bfc9a2.zip
libvirt-python-split-71697db2035db9ebda84b6404d35a89e96bfc9a2.tar.gz
libvirt-python-split-71697db2035db9ebda84b6404d35a89e96bfc9a2.tar.xz
python: fix fd leak in generator.pyv1.0.3
-rwxr-xr-xgenerator.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/generator.py b/generator.py
index 994bc11..8236bd2 100755
--- a/generator.py
+++ b/generator.py
@@ -806,6 +806,7 @@ def buildStubs(module):
try:
f = open(os.path.join(srcPref,api_xml))
data = f.read()
+ f.close()
(parser, target) = getparser()
parser.feed(data)
parser.close()
@@ -813,6 +814,7 @@ def buildStubs(module):
try:
f = open(os.path.join(srcPref,"..","docs",api_xml))
data = f.read()
+ f.close()
(parser, target) = getparser()
parser.feed(data)
parser.close()
@@ -830,6 +832,7 @@ def buildStubs(module):
try:
f = open(os.path.join(srcPref, override_api_xml))
data = f.read()
+ f.close()
(parser, target) = getparser()
parser.feed(data)
parser.close()