[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r20315: {torctl} Fix a NoneTypeException due to logging. (torctl/trunk/python/TorCtl)
Author: mikeperry
Date: 2009-08-15 13:39:22 -0400 (Sat, 15 Aug 2009)
New Revision: 20315
Modified:
torctl/trunk/python/TorCtl/ScanSupport.py
Log:
Fix a NoneTypeException due to logging.
Modified: torctl/trunk/python/TorCtl/ScanSupport.py
===================================================================
--- torctl/trunk/python/TorCtl/ScanSupport.py 2009-08-15 14:16:39 UTC (rev 20314)
+++ torctl/trunk/python/TorCtl/ScanSupport.py 2009-08-15 17:39:22 UTC (rev 20315)
@@ -144,7 +144,10 @@
def get_exit_node(self):
ret = copy.copy(self.last_exit) # GIL FTW
- plog("DEBUG", "Got last exit of "+ret.idhex)
+ if ret:
+ plog("DEBUG", "Got last exit of "+ret.idhex)
+ else:
+ plog("DEBUG", "No last exit.")
return ret
def set_exit_node(self, arg):