fix missing error to event log in commandexecutor.py

This commit is contained in:
Itai Sadan 2020-01-18 11:44:12 +02:00
parent 046de4a39b
commit eaab77960b

View File

@ -2,6 +2,7 @@ import typing
from mitmproxy import exceptions
from mitmproxy import flow
from mitmproxy import ctx
from mitmproxy.tools.console import overlay
from mitmproxy.tools.console import signals
@ -15,8 +16,10 @@ class CommandExecutor:
if cmd.strip():
try:
ret = self.master.commands.execute(cmd)
except exceptions.CommandError as v:
signals.status_message.send(message=str(v))
except exceptions.CommandError as e:
msg = str(e)
ctx.log.error(msg)
signals.status_message.send(message=msg)
else:
if ret:
if type(ret) == typing.Sequence[flow.Flow]: