From 24ecfb3b134f299b4ea6b40c487e5ea199436b75 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Tue, 26 Jun 2018 16:28:57 +0100 Subject: [PATCH] Fix setns.py syntax for 3.x --- mitogen/setns.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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,))