mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
minor fixes
This commit is contained in:
parent
2ce7166a45
commit
b28954ea5f
@ -254,10 +254,6 @@ class ConsoleMaster(flow.FlowMaster):
|
|||||||
expire=1
|
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):
|
def sig_add_log(self, sender, e, level):
|
||||||
if self.options.verbosity < utils.log_tier(level):
|
if self.options.verbosity < utils.log_tier(level):
|
||||||
return
|
return
|
||||||
@ -352,7 +348,7 @@ class ConsoleMaster(flow.FlowMaster):
|
|||||||
try:
|
try:
|
||||||
return flow.read_flows_from_paths(path)
|
return flow.read_flows_from_paths(path)
|
||||||
except exceptions.FlowReadException as e:
|
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):
|
def client_playback_path(self, path):
|
||||||
if not isinstance(path, list):
|
if not isinstance(path, list):
|
||||||
@ -748,10 +744,3 @@ class ConsoleMaster(flow.FlowMaster):
|
|||||||
direction=direction,
|
direction=direction,
|
||||||
), "info")
|
), "info")
|
||||||
self.add_log(strutils.bytes_to_escaped_str(message.content), "debug")
|
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))
|
|
||||||
|
@ -37,8 +37,6 @@ Events = frozenset([
|
|||||||
"configure",
|
"configure",
|
||||||
"done",
|
"done",
|
||||||
"tick",
|
"tick",
|
||||||
|
|
||||||
"script_change",
|
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user