aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/utils
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2017-04-27 17:05:00 +1200
committerAldo Cortesi <aldo@nullcube.com>2017-04-27 17:05:00 +1200
commit97000aa85c6d4cd52d97bda66b0c05ffed93e9da (patch)
treeb5ed172d016a6341e98d2eb765200ba39446b2c2 /mitmproxy/utils
parentb7afcb5dc2007ce451161e513d3e55d4cc91379e (diff)
downloadmitmproxy-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.py2
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