aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/io
diff options
context:
space:
mode:
authormadt1m <pietrotirenna.pt@gmail.com>2018-08-01 12:00:07 +0200
committermadt1m <pietrotirenna.pt@gmail.com>2018-08-01 12:00:07 +0200
commitafe41eb75cb7ec5d5edf54fe490bdde49294683b (patch)
tree507c847b3076f4132387034d223d6cdac315a0e9 /mitmproxy/io
parentccb5fd7c9981b65e8bb543076e89e381481340f7 (diff)
downloadmitmproxy-afe41eb75cb7ec5d5edf54fe490bdde49294683b.tar.gz
mitmproxy-afe41eb75cb7ec5d5edf54fe490bdde49294683b.tar.bz2
mitmproxy-afe41eb75cb7ec5d5edf54fe490bdde49294683b.zip
protobuf: changed return type annotation in loads to enhance granularity
Diffstat (limited to 'mitmproxy/io')
-rw-r--r--mitmproxy/io/protobuf.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mitmproxy/io/protobuf.py b/mitmproxy/io/protobuf.py
index 9a00eacf..c8ca3acc 100644
--- a/mitmproxy/io/protobuf.py
+++ b/mitmproxy/io/protobuf.py
@@ -189,7 +189,7 @@ def load_http(hf: http_pb2.HTTPFlow) -> HTTPFlow:
return f
-def loads(b: bytes, typ="http") -> flow.Flow:
+def loads(b: bytes, typ="http") -> typing.Union[HTTPFlow]:
if typ != 'http':
raise exceptions.TypeError("Flow types different than HTTP not supported yet!")
else: