diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-11-23 22:47:50 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-11-23 22:47:50 +0100 |
commit | 222106916e8c57ed9ab83f7c0c8d8a76d53ab298 (patch) | |
tree | 743898632b9f2b1d83d8a05a6725ab3311ae3ca9 /mitmproxy/master.py | |
parent | d15ddfad14052b7fd971f3b82bbb86e7ec39c40b (diff) | |
parent | 45332006a3da246679e6043b4abee06cd3ba0636 (diff) | |
download | mitmproxy-222106916e8c57ed9ab83f7c0c8d8a76d53ab298.tar.gz mitmproxy-222106916e8c57ed9ab83f7c0c8d8a76d53ab298.tar.bz2 mitmproxy-222106916e8c57ed9ab83f7c0c8d8a76d53ab298.zip |
Merge branch 'mitmweb-eventlog'
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 7f114096..7581d816 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. |