From 20fa62414c02fc073ae21d74878adce337ed53e4 Mon Sep 17 00:00:00 2001 From: Guannan Ren Date: Thu, 28 Feb 2013 18:03:46 +0800 Subject: [PATCH] python: fix fd leak in generator.py --- python/generator.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/generator.py b/python/generator.py index 994bc11559..8236bd2c98 100755 --- a/python/generator.py +++ b/python/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() -- GitLab