aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/command.py
diff options
context:
space:
mode:
authorHenrique <typoon@gmail.com>2019-11-23 15:31:00 -0500
committerHenrique <typoon@gmail.com>2019-11-23 15:31:00 -0500
commita866b424fe60928fb5336f1fa146326424763ca5 (patch)
treec2cdbebf181c3f15601daf472929210a59449f52 /mitmproxy/command.py
parent16b55f9476373347a3c2553e070497b383288360 (diff)
downloadmitmproxy-a866b424fe60928fb5336f1fa146326424763ca5.tar.gz
mitmproxy-a866b424fe60928fb5336f1fa146326424763ca5.tar.bz2
mitmproxy-a866b424fe60928fb5336f1fa146326424763ca5.zip
Moved command history to an addon and added a new feature:
* If you start typing a command and press "up" only commands starting with that string will be returned
Diffstat (limited to 'mitmproxy/command.py')
-rw-r--r--mitmproxy/command.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mitmproxy/command.py b/mitmproxy/command.py
index 6977ff91..23c39594 100644
--- a/mitmproxy/command.py
+++ b/mitmproxy/command.py
@@ -101,7 +101,9 @@ class Command:
try:
bound_arguments = self.signature.bind(*args)
except TypeError as v:
- raise exceptions.CommandError(f"Command argument mismatch: {v.args[0]}")
+ expected = f'Expected: {str(self.signature.parameters)}'
+ received = f'Received: {str(args)}'
+ raise exceptions.CommandError(f"Command argument mismatch: \n\t{expected}\n\t{received}")
for name, value in bound_arguments.arguments.items():
convert_to = self.signature.parameters[name].annotation