care for threading module being set to None already during finalization

--HG--
branch : trunk
This commit is contained in:
holger krekel 2009-05-10 21:36:13 +02:00
parent c3a6fbd8d7
commit 541b35270f
1 changed files with 2 additions and 1 deletions

View File

@ -167,7 +167,8 @@ class Gateway(object):
except IOError:
self._trace('IOError on _stopsend()')
self._channelfactory._finished_receiving()
self._trace('leaving %r' % threading.currentThread())
if threading: # might be None during shutdown/finalization
self._trace('leaving %r' % threading.currentThread())
from sys import exc_info
def _send(self, msg):