Make mitmdump handle invalid serialized data gracefully.

This commit is contained in:
Aldo Cortesi
2011-03-11 15:16:31 +13:00
parent 7d85db0da3
commit 9f16a84a9e
3 changed files with 21 additions and 5 deletions

View File

@@ -93,7 +93,7 @@ class DumpMaster(flow.FlowMaster):
try:
f = file(path, "r")
flows = list(flow.FlowReader(f).stream())
except IOError, v:
except (IOError, flow.FlowReadError), v:
raise DumpError(v.strerror)
return flows
@@ -182,7 +182,6 @@ class DumpMaster(flow.FlowMaster):
return f
# begin nocover
def run(self):
try: