From 4bdd1ed9675cef4e8a559cdde945a2899200e38d Mon Sep 17 00:00:00 2001 From: deployable Date: Thu, 4 Sep 2014 10:47:27 +0100 Subject: [PATCH] Add urwid stop prior to stack trace so exceptions are not cleared from screen --- libmproxy/console/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libmproxy/console/__init__.py b/libmproxy/console/__init__.py index 1325aae59..9d0296107 100644 --- a/libmproxy/console/__init__.py +++ b/libmproxy/console/__init__.py @@ -599,6 +599,8 @@ class ConsoleMaster(flow.FlowMaster): try: self.ui.run_wrapper(self.loop) except Exception: + self.ui.stop() + sys.stdout.flush() print >> sys.stderr, traceback.format_exc() print >> sys.stderr, "mitmproxy has crashed!" print >> sys.stderr, "Please lodge a bug report at: https://github.com/mitmproxy/mitmproxy"