[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r18665: {torctl} Also need to check existence before removing.. *sigh* This l (torctl/trunk/python/TorCtl)
Author: mikeperry
Date: 2009-02-21 07:58:12 -0500 (Sat, 21 Feb 2009)
New Revision: 18665
Modified:
torctl/trunk/python/TorCtl/TorCtl.py
Log:
Also need to check existence before removing.. *sigh*
This language is a little exception crazy, isn't it.
Modified: torctl/trunk/python/TorCtl/TorCtl.py
===================================================================
--- torctl/trunk/python/TorCtl/TorCtl.py 2009-02-21 12:43:29 UTC (rev 18664)
+++ torctl/trunk/python/TorCtl/TorCtl.py 2009-02-21 12:58:12 UTC (rev 18665)
@@ -1094,7 +1094,8 @@
for i in removed_idhexes:
if i not in self.routers: continue
self.routers[i].down = True
- self.routers[i].flags.remove("Running")
+ if "Running" in self.routers[i].flags:
+ self.routers[i].flags.remove("Running")
if self.routers[i].refcount == 0:
self.routers[i].deleted = True
plog("INFO", "Expiring non-running router "+i)