console: use master.shutdown rather than raising urwid.ExitMainLoop

This commit is contained in:
Aldo Cortesi 2017-06-13 16:16:39 +12:00
parent 79ce711784
commit e6cf9ac9ab

View File

@ -8,7 +8,6 @@ from mitmproxy.tools.console import overlay
from mitmproxy import contentviews
from mitmproxy.utils import strutils
from mitmproxy.tools.console import signals
import urwid
class Logger:
@ -253,7 +252,7 @@ class ConsoleAddon:
@command.command("console.exit")
def exit(self) -> None:
"""Exit mitmproxy."""
raise urwid.ExitMainLoop
self.master.shutdown()
@command.command("console.view.pop")
def view_pop(self) -> None: