diff --git a/mitogen/setns.py b/mitogen/setns.py index b07b4df7..1779ca77 100644 --- a/mitogen/setns.py +++ b/mitogen/setns.py @@ -151,7 +151,8 @@ class Stream(mitogen.parent.Stream): os.readlink(nspath + name) != os.readlink(selfpath + name) ) ] - except Exception, e: + except Exception: + e = sys.exc_info()[1] raise Error(str(e)) os.chdir('/proc/%s/root' % (self.leader_pid,))