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):
try:
f = open(pkgfile)
except IOError, msg:
except IOError as msg:
sys.stderr.write("Can't open %s: %s\n" %
(pkgfile, msg))
else:

Loading…
Cancel
Save