diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2017-02-08 15:00:31 +0100 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2017-02-09 16:08:35 +0100 |
commit | 1847cf175c8a45359eef08f5cf2bfc414b059dbe (patch) | |
tree | 9a564e33d3ea99c48b959e0e232768fd54d88ff6 /mitmproxy/tcp.py | |
parent | 2134b5b06abf354a595076da5ff2d43e455e1e90 (diff) | |
download | mitmproxy-1847cf175c8a45359eef08f5cf2bfc414b059dbe.tar.gz mitmproxy-1847cf175c8a45359eef08f5cf2bfc414b059dbe.tar.bz2 mitmproxy-1847cf175c8a45359eef08f5cf2bfc414b059dbe.zip |
websockets, tcp, version: coverage++
Diffstat (limited to 'mitmproxy/tcp.py')
-rw-r--r-- | mitmproxy/tcp.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mitmproxy/tcp.py b/mitmproxy/tcp.py index 3f10f82b..067fbfe3 100644 --- a/mitmproxy/tcp.py +++ b/mitmproxy/tcp.py @@ -9,8 +9,8 @@ from mitmproxy.types import serializable class TCPMessage(serializable.Serializable): def __init__(self, from_client, content, timestamp=None): - self.content = content self.from_client = from_client + self.content = content self.timestamp = timestamp or time.time() @classmethod @@ -21,9 +21,7 @@ class TCPMessage(serializable.Serializable): return self.from_client, self.content, self.timestamp def set_state(self, state): - self.from_client = state.pop("from_client") - self.content = state.pop("content") - self.timestamp = state.pop("timestamp") + self.from_client, self.content, self.timestamp = state def __repr__(self): return "{direction} {content}".format( |