Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

better error handling for malformed dump file

  • Loading branch information...
commit e8382f9680f7068e6a88774d4afda6f6965861db 1 parent b08b68f
@danwent authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 utilities/file_analyzer.py
View
5 utilities/file_analyzer.py
@@ -19,7 +19,6 @@
# and call 'run_analyzer' with the name of a database dump file and an instance of the
# analyzer class
-
class NotaryFileAnalyzer:
def start(self):
@@ -57,6 +56,10 @@ def run_analyzer(fname, analyzer):
break
# otherwise, must be a key
key_arr = line.split()
+ if(len(key_arr) != 3):
+ print "Error: While parsing '%s', expected key or " \
+ "'End Host', but got '%s'" % \
+ (service_id, line)
analyzer.on_key(key_arr[0], key_arr[2])
while True:
Please sign in to comment.
Something went wrong with that request. Please try again.