[py-svn] r45549 - py/trunk/py/execnet

hpk at codespeak.net hpk at codespeak.net
Wed Aug 8 14:02:59 CEST 2007


Author: hpk
Date: Wed Aug  8 14:02:55 2007
New Revision: 45549

Modified:
   py/trunk/py/execnet/gateway.py
Log:
fix a bug that servemain() wouldn't actually 
try to join threads at exit because of a 
(hidden) attribute error. 



Modified: py/trunk/py/execnet/gateway.py
==============================================================================
--- py/trunk/py/execnet/gateway.py	(original)
+++ py/trunk/py/execnet/gateway.py	Wed Aug  8 14:02:55 2007
@@ -50,7 +50,7 @@
             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 @@
             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 @@
                     break
         finally:
             self._trace("_servemain finished") 
-        if self.joining:
+        if joining:
             self.join()
 
     def remote_init_threads(self, num=None):



More information about the pytest-commit mailing list