mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 10:35:20 +00:00
python: fix fd leak in generator.py
This commit is contained in:
parent
2387fdb7d0
commit
20fa62414c
@ -806,6 +806,7 @@ def buildStubs(module):
|
|||||||
try:
|
try:
|
||||||
f = open(os.path.join(srcPref,api_xml))
|
f = open(os.path.join(srcPref,api_xml))
|
||||||
data = f.read()
|
data = f.read()
|
||||||
|
f.close()
|
||||||
(parser, target) = getparser()
|
(parser, target) = getparser()
|
||||||
parser.feed(data)
|
parser.feed(data)
|
||||||
parser.close()
|
parser.close()
|
||||||
@ -813,6 +814,7 @@ def buildStubs(module):
|
|||||||
try:
|
try:
|
||||||
f = open(os.path.join(srcPref,"..","docs",api_xml))
|
f = open(os.path.join(srcPref,"..","docs",api_xml))
|
||||||
data = f.read()
|
data = f.read()
|
||||||
|
f.close()
|
||||||
(parser, target) = getparser()
|
(parser, target) = getparser()
|
||||||
parser.feed(data)
|
parser.feed(data)
|
||||||
parser.close()
|
parser.close()
|
||||||
@ -830,6 +832,7 @@ def buildStubs(module):
|
|||||||
try:
|
try:
|
||||||
f = open(os.path.join(srcPref, override_api_xml))
|
f = open(os.path.join(srcPref, override_api_xml))
|
||||||
data = f.read()
|
data = f.read()
|
||||||
|
f.close()
|
||||||
(parser, target) = getparser()
|
(parser, target) = getparser()
|
||||||
parser.feed(data)
|
parser.feed(data)
|
||||||
parser.close()
|
parser.close()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user