aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-07-15 00:07:32 -0700
committerMaximilian Hils <git@maximilianhils.com>2016-07-15 00:07:32 -0700
commit60d2e14cb9617d98d24cb3278f2f7245bef91a29 (patch)
tree0f64e48b9420fe966f36da16945c9f422f1183c1
parent64e16f5112669a31f86183be640eeee3a47c2961 (diff)
downloadmitmproxy-60d2e14cb9617d98d24cb3278f2f7245bef91a29.tar.gz
mitmproxy-60d2e14cb9617d98d24cb3278f2f7245bef91a29.tar.bz2
mitmproxy-60d2e14cb9617d98d24cb3278f2f7245bef91a29.zip
fix #1358
-rw-r--r--mitmproxy/console/flowlist.py14
-rw-r--r--mitmproxy/console/statusbar.py8
2 files changed, 11 insertions, 11 deletions
diff --git a/mitmproxy/console/flowlist.py b/mitmproxy/console/flowlist.py
index 8c20c4b6..2f167a4d 100644
--- a/mitmproxy/console/flowlist.py
+++ b/mitmproxy/console/flowlist.py
@@ -317,11 +317,9 @@ class FlowListWalker(urwid.ListWalker):
class FlowListBox(urwid.ListBox):
def __init__(self, master):
+ # type: (mitmproxy.console.master.ConsoleMaster) -> None
self.master = master
- urwid.ListBox.__init__(
- self,
- FlowListWalker(master, master.state)
- )
+ super(FlowListBox, self).__init__(FlowListWalker(master, master.state))
def get_method_raw(self, k):
if k:
@@ -395,13 +393,13 @@ class FlowListBox(urwid.ListBox):
elif key == "F":
self.master.toggle_follow_flows()
elif key == "W":
- if self.master.stream:
- self.master.stop_stream()
+ if self.master.options.outfile:
+ self.master.options.outfile = None
else:
signals.status_prompt_path.send(
self,
- prompt = "Stream flows to",
- callback = self.master.start_stream_to_path
+ prompt="Stream flows to",
+ callback= lambda path: self.master.options.update(outfile=(path, "ab"))
)
else:
return urwid.ListBox.keypress(self, size, key)
diff --git a/mitmproxy/console/statusbar.py b/mitmproxy/console/statusbar.py
index e7a700a6..040ea26d 100644
--- a/mitmproxy/console/statusbar.py
+++ b/mitmproxy/console/statusbar.py
@@ -116,10 +116,12 @@ class ActionBar(urwid.WidgetWrap):
class StatusBar(urwid.WidgetWrap):
def __init__(self, master, helptext):
- self.master, self.helptext = master, helptext
+ # type: (mitmproxy.console.master.ConsoleMaster, object) -> None
+ self.master = master
+ self.helptext = helptext
self.ab = ActionBar()
self.ib = urwid.WidgetWrap(urwid.Text(""))
- self._w = urwid.Pile([self.ib, self.ab])
+ super(StatusBar, self).__init__(urwid.Pile([self.ib, self.ab]))
signals.update_settings.connect(self.sig_update_settings)
signals.flowlist_change.connect(self.sig_update_settings)
master.options.changed.connect(self.sig_update_settings)
@@ -224,7 +226,7 @@ class StatusBar(urwid.WidgetWrap):
r.append("cripts:%s]" % len(self.master.options.scripts))
if self.master.options.outfile:
- r.append("[W:%s]" % self.master.outfile[0])
+ r.append("[W:%s]" % self.master.options.outfile[0])
return r