From 47b5fd666d549b5ff033c59654a7d0394ce0a51c Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Fri, 27 Jul 2012 02:13:21 +1200 Subject: [PATCH] Fix mitmproxy file reading. --- libmproxy/console/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmproxy/console/__init__.py b/libmproxy/console/__init__.py index 898e858f4..c047f9f9f 100644 --- a/libmproxy/console/__init__.py +++ b/libmproxy/console/__init__.py @@ -550,7 +550,7 @@ class ConsoleMaster(flow.FlowMaster): ret = self.load_flows(self.options.rfile) if ret and self.state.flow_count(): self.add_event("File truncated or corrupted. Loaded as many flows as possible.") - else: + elif not self.state.flow_count(): self.shutdown() print >> sys.stderr, "Could not load file:", ret sys.exit(1)