[or-cvs] r21710: {torctl} Handle the return of an empty network status doc. (torctl/trunk/python/TorCtl)
Mike Perry
mikeperry-svn at fscked.org
Sun Feb 21 00:12:02 UTC 2010
Author: mikeperry
Date: 2010-02-21 00:12:01 +0000 (Sun, 21 Feb 2010)
New Revision: 21710
Modified:
torctl/trunk/python/TorCtl/TorCtl.py
Log:
Handle the return of an empty network status doc.
Modified: torctl/trunk/python/TorCtl/TorCtl.py
===================================================================
--- torctl/trunk/python/TorCtl/TorCtl.py 2010-02-20 04:17:03 UTC (rev 21709)
+++ torctl/trunk/python/TorCtl/TorCtl.py 2010-02-21 00:12:01 UTC (rev 21710)
@@ -968,6 +968,7 @@
def parse_ns_body(data):
"""Parse the body of an NS event or command into a list of
NetworkStatus instances"""
+ if not data: return []
nsgroups = re.compile(r"^r ", re.M).split(data)
nsgroups.pop(0)
nslist = []
More information about the tor-commits
mailing list