[or-cvs] r18655: {torflow} Catch TorCtlConnClosed at exit. (torflow/trunk)

mikeperry at seul.org mikeperry at seul.org
Fri Feb 20 10:22:32 UTC 2009


Author: mikeperry
Date: 2009-02-20 05:22:31 -0500 (Fri, 20 Feb 2009)
New Revision: 18655

Modified:
   torflow/trunk/metatroller.py
Log:

Catch TorCtlConnClosed at exit.



Modified: torflow/trunk/metatroller.py
===================================================================
--- torflow/trunk/metatroller.py	2009-02-20 10:21:02 UTC (rev 18654)
+++ torflow/trunk/metatroller.py	2009-02-20 10:22:31 UTC (rev 18655)
@@ -226,8 +226,11 @@
 
 def cleanup(c, s, f):
   plog("INFO", "Resetting __LeaveStreamsUnattached=0 and FetchUselessDescriptors="+f)
-  c.set_option("__LeaveStreamsUnattached", "0")
-  c.set_option("FetchUselessDescriptors", f) 
+  try:
+    c.set_option("__LeaveStreamsUnattached", "0")
+    c.set_option("FetchUselessDescriptors", f)
+  except TorCtl.TorCtlClosed:
+    pass
   s.close()
 
 def listenloop(c, h, f):



More information about the tor-commits mailing list