From 14d393765b5c6bbfa014060d22425a52b1c22f45 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sun, 27 Jan 2019 19:38:17 +0000 Subject: [PATCH] issue #488: 2.4-compatible syntax in unix.py. --- mitogen/unix.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mitogen/unix.py b/mitogen/unix.py index 57c0f84d..5d20b6b1 100644 --- a/mitogen/unix.py +++ b/mitogen/unix.py @@ -91,7 +91,8 @@ class Listener(mitogen.core.BasicStream): def _unlink_socket(self): try: os.unlink(self.path) - except OSError as e: + except OSError: + e = sys.exc_info()[1] # Prevent a shutdown race with the parent process. if e.args[0] != errno.ENOENT: raise