aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy
diff options
context:
space:
mode:
authorItai Sadan <itaisod@gmail.com>2020-01-18 12:00:23 +0200
committerItai Sadan <itaisod@gmail.com>2020-01-18 12:00:23 +0200
commit04c88b49c8df71bd3198bad10f15a58ca449fbce (patch)
tree5a3bca1b5caa041277cd4fb892d8f64b79162597 /mitmproxy
parenteaab77960b90b1fbb2d4282550ffa084e004051d (diff)
downloadmitmproxy-04c88b49c8df71bd3198bad10f15a58ca449fbce.tar.gz
mitmproxy-04c88b49c8df71bd3198bad10f15a58ca449fbce.tar.bz2
mitmproxy-04c88b49c8df71bd3198bad10f15a58ca449fbce.zip
remove status_message.send where log.error has the same effect
Diffstat (limited to 'mitmproxy')
-rw-r--r--mitmproxy/tools/console/commandexecutor.py4
-rw-r--r--mitmproxy/tools/console/consoleaddons.py12
2 files changed, 4 insertions, 12 deletions
diff --git a/mitmproxy/tools/console/commandexecutor.py b/mitmproxy/tools/console/commandexecutor.py
index 697c616c..1c6d5aa6 100644
--- a/mitmproxy/tools/console/commandexecutor.py
+++ b/mitmproxy/tools/console/commandexecutor.py
@@ -17,9 +17,7 @@ class CommandExecutor:
try:
ret = self.master.commands.execute(cmd)
except exceptions.CommandError as e:
- msg = str(e)
- ctx.log.error(msg)
- signals.status_message.send(message=msg)
+ ctx.log.error(str(e))
else:
if ret:
if type(ret) == typing.Sequence[flow.Flow]:
diff --git a/mitmproxy/tools/console/consoleaddons.py b/mitmproxy/tools/console/consoleaddons.py
index 617ac5e5..905653e7 100644
--- a/mitmproxy/tools/console/consoleaddons.py
+++ b/mitmproxy/tools/console/consoleaddons.py
@@ -252,9 +252,7 @@ class ConsoleAddon:
try:
self.master.commands.call_strings(cmd, repl)
except exceptions.CommandError as e:
- msg = str(e)
- ctx.log.error(msg)
- signals.status_message.send(message=msg)
+ ctx.log.error(str(e))
self.master.overlay(
overlay.Chooser(self.master, prompt, choices, "", callback)
@@ -281,9 +279,7 @@ class ConsoleAddon:
try:
self.master.commands.call_strings(subcmd, repl)
except exceptions.CommandError as e:
- msg = str(e)
- ctx.log.error(msg)
- signals.status_message.send(message=msg)
+ ctx.log.error(str(e))
self.master.overlay(
overlay.Chooser(self.master, prompt, choices, "", callback)
@@ -547,9 +543,7 @@ class ConsoleAddon:
["@focus", "flowview_mode_%s" % (idx,), mode]
)
except exceptions.CommandError as e:
- msg = str(e)
- ctx.log.error(msg)
- signals.status_message.send(message=msg)
+ ctx.log.error(str(e))
@command.command("console.flowview.mode.options")
def flowview_mode_options(self) -> typing.Sequence[str]: