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:
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…
Reference in New Issue