From 2371fb16faa36bbcada42050e5413bbd662ade1d Mon Sep 17 00:00:00 2001 From: hpk Date: Wed, 8 Aug 2007 14:02:55 +0200 Subject: [PATCH] [svn r45549] fix a bug that servemain() wouldn't actually try to join threads at exit because of a (hidden) attribute error. --HG-- branch : trunk --- py/execnet/gateway.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/py/execnet/gateway.py b/py/execnet/gateway.py index 417d92359..cbfe0d277 100644 --- a/py/execnet/gateway.py +++ b/py/execnet/gateway.py @@ -50,7 +50,7 @@ class GatewayCleanup: debug.flush() for gw in self._activegateways.keys(): gw.exit() - gw.join() # should work as well + #gw.join() # should work as well # ---------------------------------------------------------- # Base Gateway (used for both remote and local side) @@ -141,15 +141,15 @@ class Gateway(object): self._channelfactory._finished_receiving() self._trace('leaving %r' % threading.currentThread()) + from sys import exc_info def _send(self, msg): - from sys import exc_info if msg is None: self._io.close_write() else: try: msg.writeto(self._io) except: - excinfo = exc_info() + excinfo = self.exc_info() self._traceex(excinfo) msg.post_sent(self, excinfo) else: @@ -193,7 +193,7 @@ class Gateway(object): break finally: self._trace("_servemain finished") - if self.joining: + if joining: self.join() def remote_init_threads(self, num=None):