[or-cvs] [torflow/master] Handle truncated or odd slice file input.

mikeperry at torproject.org mikeperry at torproject.org
Wed Jun 30 12:19:38 UTC 2010


Author: Mike Perry <mikeperry-git at fscked.org>
Date: Wed, 30 Jun 2010 05:18:52 -0700
Subject: Handle truncated or odd slice file input.
Commit: 88fe4f295b61a6b8dd3df41473904dd235bcd261

---
 NetworkScanners/BwAuthority/aggregate.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/NetworkScanners/BwAuthority/aggregate.py b/NetworkScanners/BwAuthority/aggregate.py
index 517349e..712a9c5 100755
--- a/NetworkScanners/BwAuthority/aggregate.py
+++ b/NetworkScanners/BwAuthority/aggregate.py
@@ -327,6 +327,11 @@ def main(argv):
         n.add_line(line)
       except ValueError,e:
         plog("NOTICE", "Conversion error "+str(e)+" at "+l)
+      except AttributeError, e:
+        plog("NOTICE", "Slice file format error "+str(e)+" at "+l)
+      except Exception, e:
+        plog("WARN", "Unknown slice parse error "+str(e)+" at "+l)
+        traceback.print_exc()
     fp.close()
 
   if len(nodes) == 0:
-- 
1.7.1



More information about the tor-commits mailing list