[or-cvs] r21711: {torctl} Handle the return of an empty network status doc. (torctl/branches/stable/python/TorCtl)

Mike Perry mikeperry-svn at fscked.org
Sun Feb 21 00:14:16 UTC 2010


Author: mikeperry
Date: 2010-02-21 00:14:16 +0000 (Sun, 21 Feb 2010)
New Revision: 21711

Modified:
   torctl/branches/stable/python/TorCtl/TorCtl.py
Log:

Handle the return of an empty network status doc.



Modified: torctl/branches/stable/python/TorCtl/TorCtl.py
===================================================================
--- torctl/branches/stable/python/TorCtl/TorCtl.py	2010-02-21 00:12:01 UTC (rev 21710)
+++ torctl/branches/stable/python/TorCtl/TorCtl.py	2010-02-21 00:14:16 UTC (rev 21711)
@@ -941,6 +941,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