console: don't let messages overwrite prompts

This renders mitmproxy unresponsive and is bad UX as well.
This commit is contained in:
Aldo Cortesi 2016-07-16 11:48:16 +12:00
parent 50c76ac4ff
commit 17305643bc

View File

@ -28,9 +28,10 @@ class ActionBar(urwid.WidgetWrap):
self.pathprompt = False
def sig_message(self, sender, message, expire=None):
if self.prompting:
return
w = urwid.Text(message)
self._w = w
self.prompting = False
if expire:
def cb(*args):
if w == self._w: