diff options
author | Aldo Cortesi <aldo@corte.si> | 2017-12-19 11:50:12 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@corte.si> | 2017-12-19 11:50:12 +1300 |
commit | d98fc4f03a88751944c0ae08ee2ac3e743f92952 (patch) | |
tree | 3978a872336a35c89e754e017f430d1269e234de /mitmproxy/types.py | |
parent | 843bad187cfe40c9714c6deb5170d055021a462e (diff) | |
download | mitmproxy-d98fc4f03a88751944c0ae08ee2ac3e743f92952.tar.gz mitmproxy-d98fc4f03a88751944c0ae08ee2ac3e743f92952.tar.bz2 mitmproxy-d98fc4f03a88751944c0ae08ee2ac3e743f92952.zip |
commands: partial parser now returns help for remaining arguments
Diffstat (limited to 'mitmproxy/types.py')
-rw-r--r-- | mitmproxy/types.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mitmproxy/types.py b/mitmproxy/types.py index 35d4ed7e..36f33943 100644 --- a/mitmproxy/types.py +++ b/mitmproxy/types.py @@ -174,6 +174,8 @@ class _CmdType(_BaseType): return list(manager.commands.keys()) def parse(self, manager: _CommandBase, t: type, s: str) -> str: + if s not in manager.commands: + raise exceptions.TypeError("Unknown command: %s" % s) return s def is_valid(self, manager: _CommandBase, typ: typing.Any, val: typing.Any) -> bool: |