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