From b28954ea5fb49be6433ea7a187bee1f7baef3304 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 21 Jul 2016 18:32:47 -0700 Subject: [PATCH] minor fixes --- mitmproxy/console/master.py | 13 +------------ mitmproxy/controller.py | 2 -- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/mitmproxy/console/master.py b/mitmproxy/console/master.py index 21ad97e80..f4617f621 100644 --- a/mitmproxy/console/master.py +++ b/mitmproxy/console/master.py @@ -254,10 +254,6 @@ class ConsoleMaster(flow.FlowMaster): expire=1 ) - def load_script(self, command, use_reloader=True): - # We default to using the reloader in the console ui. - return super(ConsoleMaster, self).load_script(command, use_reloader) - def sig_add_log(self, sender, e, level): if self.options.verbosity < utils.log_tier(level): return @@ -352,7 +348,7 @@ class ConsoleMaster(flow.FlowMaster): try: return flow.read_flows_from_paths(path) except exceptions.FlowReadException as e: - signals.status_message.send(message=e.strerror) + signals.status_message.send(message=str(e)) def client_playback_path(self, path): if not isinstance(path, list): @@ -748,10 +744,3 @@ class ConsoleMaster(flow.FlowMaster): direction=direction, ), "info") self.add_log(strutils.bytes_to_escaped_str(message.content), "debug") - - @controller.handler - def script_change(self, script): - if super(ConsoleMaster, self).script_change(script): - signals.status_message.send(message='"{}" reloaded.'.format(script.path)) - else: - signals.status_message.send(message='Error reloading "{}".'.format(script.path)) diff --git a/mitmproxy/controller.py b/mitmproxy/controller.py index 070ec8620..35817a85d 100644 --- a/mitmproxy/controller.py +++ b/mitmproxy/controller.py @@ -37,8 +37,6 @@ Events = frozenset([ "configure", "done", "tick", - - "script_change", ])