aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/console
diff options
context:
space:
mode:
authorVyacheslav Bakhmutov <m0sth8@yandex-team.ru>2014-06-13 14:14:55 +0700
committerVyacheslav Bakhmutov <m0sth8@yandex-team.ru>2014-06-13 14:14:55 +0700
commitb7c1d057828054a7e8d5f9ccf2c3c93ca8888ed3 (patch)
tree1b9dca008c5b1be260b74fce024b620b00dd7cc6 /libmproxy/console
parent00fd243810954b1ea7c108482513a7e92f2e8000 (diff)
downloadmitmproxy-b7c1d057828054a7e8d5f9ccf2c3c93ca8888ed3.tar.gz
mitmproxy-b7c1d057828054a7e8d5f9ccf2c3c93ca8888ed3.tar.bz2
mitmproxy-b7c1d057828054a7e8d5f9ccf2c3c93ca8888ed3.zip
Remove global should_exit and fix tests
Diffstat (limited to 'libmproxy/console')
-rw-r--r--libmproxy/console/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/libmproxy/console/__init__.py b/libmproxy/console/__init__.py
index c1ef4331..e660f312 100644
--- a/libmproxy/console/__init__.py
+++ b/libmproxy/console/__init__.py
@@ -577,7 +577,7 @@ class ConsoleMaster(flow.FlowMaster):
self.view_flowlist()
- self.server.start_slave(controller.Slave, controller.Channel(self.masterq))
+ self.server.start_slave(controller.Slave, controller.Channel(self.masterq, self.should_exit))
if self.options.rfile:
ret = self.load_flows(self.options.rfile)
@@ -780,7 +780,7 @@ class ConsoleMaster(flow.FlowMaster):
def loop(self):
changed = True
try:
- while not controller.should_exit:
+ while not self.should_exit.is_set():
startloop = time.time()
if changed:
self.statusbar.redraw()