pkgutil: fix Python3 compatibility

Starting with Python3 the `as` clause must be used to associate a name to the
exception being passed.
This commit is contained in:
Marc Hartmayer 2019-08-08 18:50:40 +02:00
parent 444b7d6d97
commit 0a6c0cd8fb
1 changed files with 1 additions and 1 deletions

View File

@ -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: