aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/utils
diff options
context:
space:
mode:
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 20af0150..ae1a507d 100644
--- a/mitmproxy/utils/typecheck.py
+++ b/mitmproxy/utils/typecheck.py
@@ -65,6 +65,8 @@ def check_type(attr_name: str, value: typing.Any, typeinfo: type) -> None:
elif typename.startswith("typing.IO"):
if hasattr(value, "read"):
return
+ else:
+ raise e
elif not isinstance(value, typeinfo):
raise e