From 0a6c0cd8fb36792efdeeb0f1226389fa69f23ba4 Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Thu, 8 Aug 2019 18:50:40 +0200 Subject: [PATCH] pkgutil: fix Python3 compatibility Starting with Python3 the `as` clause must be used to associate a name to the exception being passed. --- mitogen/compat/pkgutil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mitogen/compat/pkgutil.py b/mitogen/compat/pkgutil.py index 28e2aead..df3983a2 100644 --- a/mitogen/compat/pkgutil.py +++ b/mitogen/compat/pkgutil.py @@ -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: