commit 293214df5a0cff14e6c626fa7be37cda1edd6350 Author: Mike Perry mikeperry-git@fscked.org Date: Wed Feb 23 11:17:48 2011 -0800
Fix an exception ordering issue. --- NetworkScanners/statsplitter.py | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/NetworkScanners/statsplitter.py b/NetworkScanners/statsplitter.py index 2b088d1..f2d8f91 100755 --- a/NetworkScanners/statsplitter.py +++ b/NetworkScanners/statsplitter.py @@ -433,17 +433,17 @@ def check_port_bytes(sorted_rlist, top_n): try: extra_info = c.sendAndRecv("GETINFO extra-info/digest/" + r.extra_info_digest + "\r\n")[0][2] + if "exit-kibibytes-written" in extra_info: + displayed += 1 + g = re.search("exit-kibibytes-read (\S+)", extra_info).group(1) + (tot, port_list) = split_port_list(g) + display_port_list(r, "read", tot, port_list) + g = re.search("exit-kibibytes-written (\S+)", extra_info).group(1) + (tot, port_list) = split_port_list(g) + display_port_list(r, "wrote", tot, port_list) + print except TorCtl.ErrorReply: print "Not all extra info docs present. Missing one for router "+r.idhex+"="+r.nickname - if "exit-kibibytes-written" in extra_info: - displayed += 1 - g = re.search("exit-kibibytes-read (\S+)", extra_info).group(1) - (tot, port_list) = split_port_list(g) - display_port_list(r, "read", tot, port_list) - g = re.search("exit-kibibytes-written (\S+)", extra_info).group(1) - (tot, port_list) = split_port_list(g) - display_port_list(r, "wrote", tot, port_list) - print
check_slices()
tor-commits@lists.torproject.org