From 30ae3d85cbffe166e8779b57eab75ec549a6324b Mon Sep 17 00:00:00 2001 From: David Wilson Date: Fri, 9 Aug 2019 22:17:31 +0100 Subject: [PATCH] compat: fix Py2.4 SyntaxError --- mitogen/compat/pkgutil.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mitogen/compat/pkgutil.py b/mitogen/compat/pkgutil.py index df3983a2..15eb2afa 100644 --- a/mitogen/compat/pkgutil.py +++ b/mitogen/compat/pkgutil.py @@ -542,7 +542,8 @@ def extend_path(path, name): if os.path.isfile(pkgfile): try: f = open(pkgfile) - except IOError as msg: + except IOError: + msg = sys.exc_info()[1] sys.stderr.write("Can't open %s: %s\n" % (pkgfile, msg)) else: