aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mitmproxy/tools/console/commandexecutor.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/mitmproxy/tools/console/commandexecutor.py b/mitmproxy/tools/console/commandexecutor.py
index c738e349..697c616c 100644
--- a/mitmproxy/tools/console/commandexecutor.py
+++ b/mitmproxy/tools/console/commandexecutor.py
@@ -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]: