[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



Author: Mike Perry <mikeperry-git@xxxxxxxxxx>
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