From 97000aa85c6d4cd52d97bda66b0c05ffed93e9da Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 27 Apr 2017 17:05:00 +1200 Subject: 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 --- mitmproxy/utils/typecheck.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mitmproxy/utils') 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 -- cgit v1.2.3