diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2017-04-27 17:05:00 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2017-04-27 17:05:00 +1200 |
commit | 97000aa85c6d4cd52d97bda66b0c05ffed93e9da (patch) | |
tree | b5ed172d016a6341e98d2eb765200ba39446b2c2 /mitmproxy/utils | |
parent | b7afcb5dc2007ce451161e513d3e55d4cc91379e (diff) | |
download | mitmproxy-97000aa85c6d4cd52d97bda66b0c05ffed93e9da.tar.gz mitmproxy-97000aa85c6d4cd52d97bda66b0c05ffed93e9da.tar.bz2 mitmproxy-97000aa85c6d4cd52d97bda66b0c05ffed93e9da.zip |
command: save.file flowspec path -> None
Our first user-facing command. The following commands do the obvious things:
save.file @marked /tmp/flows
save.file @focus /tmp/flows
save.file @hidden /tmp/flows
save.file "~m get" /tmp/flows
Diffstat (limited to 'mitmproxy/utils')
-rw-r--r-- | mitmproxy/utils/typecheck.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mitmproxy/utils/typecheck.py b/mitmproxy/utils/typecheck.py index 33dd70b0..20791e17 100644 --- a/mitmproxy/utils/typecheck.py +++ b/mitmproxy/utils/typecheck.py @@ -19,6 +19,8 @@ def check_command_return_type(value: typing.Any, typeinfo: typing.Any) -> bool: for v in value: if not check_command_return_type(v, T): return False + elif value is None and typeinfo is None: + return True elif not isinstance(value, typeinfo): return False return True |