diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-11-23 22:35:07 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-11-23 22:35:07 +0100 |
commit | 45332006a3da246679e6043b4abee06cd3ba0636 (patch) | |
tree | 938bfacbd2c7329a4f9cb87c6d9f02c19d643fce /mitmproxy/master.py | |
parent | dc75605e463f064fce07a1a7bf23b16f66742cbb (diff) | |
download | mitmproxy-45332006a3da246679e6043b4abee06cd3ba0636.tar.gz mitmproxy-45332006a3da246679e6043b4abee06cd3ba0636.tar.bz2 mitmproxy-45332006a3da246679e6043b4abee06cd3ba0636.zip |
mitmweb: 100% app test coverage, numerous fixes
Diffstat (limited to 'mitmproxy/master.py')
-rw-r--r-- | mitmproxy/master.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mitmproxy/master.py b/mitmproxy/master.py index 55eb74e5..c18e18ca 100644 --- a/mitmproxy/master.py +++ b/mitmproxy/master.py @@ -156,7 +156,7 @@ class Master: for e, o in events.event_sequence(f): getattr(self, e)(o) - def load_flows(self, fr): + def load_flows(self, fr: io.FlowReader) -> int: """ Load flows from a FlowReader object. """ @@ -166,7 +166,7 @@ class Master: self.load_flow(i) return cnt - def load_flows_file(self, path): + def load_flows_file(self, path: str) -> int: path = os.path.expanduser(path) try: if path == "-": @@ -180,7 +180,11 @@ class Master: except IOError as v: raise exceptions.FlowReadException(v.strerror) - def replay_request(self, f, block=False): + def replay_request( + self, + f: http.HTTPFlow, + block: bool=False + ) -> http_replay.RequestReplayThread: """ Replay a HTTP request to receive a new response from the server. |