1. Alfredo Deza
  2. execnet

Commits

Alfredo Deza  committed ed05ae7

don't call sys when interpreter is shutting down

  • Participants
  • Parent commits 47ff365
  • Branches default

Comments (0)

Files changed (1)

File execnet/gateway_base.py

View file
             try:
                 self._result = func(*args, **kwargs)
             except:
-                self._excinfo = sys.exc_info()
+                # sys may be already None when shutting down the interpreter
+                if sys is not None:
+                    self._excinfo = sys.exc_info()
         finally:
             self._result_ready.set()
             self.running = False