1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-08-07 06:43:02 +03:00

python: Fix file variable not defined during exception

This commit is contained in:
Dan Yeaw
2025-04-11 16:53:41 -04:00
committed by Nick Wellnhofer
parent ffef921be3
commit e26478545f

View File

@@ -683,7 +683,7 @@ def buildStubs():
parser.feed(data) parser.feed(data)
parser.close() parser.close()
except IOError as msg: except IOError as msg:
print(file, ":", msg) print("Failed to open libxml2-api.xml:", msg)
sys.exit(1) sys.exit(1)
n = len(list(functions.keys())) n = len(list(functions.keys()))
@@ -697,7 +697,7 @@ def buildStubs():
parser.feed(data) parser.feed(data)
parser.close() parser.close()
except IOError as msg: except IOError as msg:
print(file, ":", msg) print("Failed to open libxml2-python-api.xml:", msg)
print("Found %d functions in libxml2-python-api.xml" % ( print("Found %d functions in libxml2-python-api.xml" % (