diff options
author | Jake Drahos <drahos.jake@gmail.com> | 2015-06-11 11:40:03 -0500 |
---|---|---|
committer | Jake Drahos <drahos.jake@gmail.com> | 2015-06-11 11:40:03 -0500 |
commit | e53a2426c153337fe25ef6dd13059cf2c4d0ab0b (patch) | |
tree | f6fa3bbe36d7914adf8930f224f5893a5067f0a6 /libmproxy | |
parent | 8b998cfbeace0777293f3cef804c1bf239758273 (diff) | |
download | mitmproxy-e53a2426c153337fe25ef6dd13059cf2c4d0ab0b.tar.gz mitmproxy-e53a2426c153337fe25ef6dd13059cf2c4d0ab0b.tar.bz2 mitmproxy-e53a2426c153337fe25ef6dd13059cf2c4d0ab0b.zip |
Marked flows not deleted on clear all
Marked flows survive a clear all unless all current flows are marked.
Bug: They don't show up until another flow is added
Diffstat (limited to 'libmproxy')
-rw-r--r-- | libmproxy/console/flowlist.py | 4 | ||||
-rw-r--r-- | libmproxy/flow.py | 11 |
2 files changed, 11 insertions, 4 deletions
diff --git a/libmproxy/console/flowlist.py b/libmproxy/console/flowlist.py index 8bb6f87a..f7835419 100644 --- a/libmproxy/console/flowlist.py +++ b/libmproxy/console/flowlist.py @@ -181,10 +181,6 @@ class ConnectionItem(urwid.WidgetWrap): elif key == "m": self.flow.toggle_mark() signals.flowlist_change.send(self) - if self.flow.marked: - signals.status_message.send(message="Flow is now marked") - else: - signals.status_message.send(message="Flow is now not marked") elif key == "r": r = self.master.replay_request(self.flow) if r: diff --git a/libmproxy/flow.py b/libmproxy/flow.py index 1a052f51..65aa2909 100644 --- a/libmproxy/flow.py +++ b/libmproxy/flow.py @@ -494,8 +494,19 @@ class FlowStore(FlowList): self._recalculate_views() def _clear(self): + marked_flows = [] + for f in self._list: + if f.marked: + marked_flows.append(f) + if len(marked_flows) == len(self._list): + marked_flows = [] + self._list = [] self._set = set() + + for f in marked_flows: + self._add(f) + self._recalculate_views() def _recalculate_views(self): |