提交 20fa6241 编写于 作者: G Guannan Ren

python: fix fd leak in generator.py

上级 2387fdb7
......@@ -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()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册