commit 7a44c16b4b9fdb2603bfed0f9e0a691c8b8dd304 Author: aagbsn aagbsn@extc.org Date: Fri Jun 17 12:20:50 2011 -0700
Case for NO streams added --- NetworkScanners/BwAuthority/bwauthority_child.py | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/NetworkScanners/BwAuthority/bwauthority_child.py b/NetworkScanners/BwAuthority/bwauthority_child.py index dc777b0..ee87829 100755 --- a/NetworkScanners/BwAuthority/bwauthority_child.py +++ b/NetworkScanners/BwAuthority/bwauthority_child.py @@ -323,7 +323,11 @@ def main(argv):
def ignore_streams(c,hdlr): for stream in c.get_info("stream-status")['stream-status'].rstrip("\n").split("\n"): - f = re.match("(?P<sid>\d*)\s(?P<status>\S*)\s(?P<cid>\d*)\s(?P<host>\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}):(?P<port>\d{1,5})",stream).groupdict() + m = re.match("(?P<sid>\d*)\s(?P<status>\S*)\s(?P<cid>\d*)\s(?P<host>\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}):(?P<port>\d{1,5})",stream) + if m: + f = m.groupdict() + else: + return # no streams s = PathSupport.Stream(int(f['sid']), f['host'], int(f['port']), 0) plog("DEBUG", "Ignoring foreign stream: %s" % f['sid']) s.ignored = True
tor-commits@lists.torproject.org