pkgutil: fix Python3 compatibility

Starting with Python3 the `as` clause must be used to associate a name to the
exception being passed.
pull/612/head
Marc Hartmayer 5 years ago
parent 444b7d6d97
commit 0a6c0cd8fb

@ -542,7 +542,7 @@ def extend_path(path, name):
if os.path.isfile(pkgfile): if os.path.isfile(pkgfile):
try: try:
f = open(pkgfile) f = open(pkgfile)
except IOError, msg: except IOError as msg:
sys.stderr.write("Can't open %s: %s\n" % sys.stderr.write("Can't open %s: %s\n" %
(pkgfile, msg)) (pkgfile, msg))
else: else:

Loading…
Cancel
Save