diff options
author | Rouli <rouli.net@gmail.com> | 2013-02-28 13:28:42 +0200 |
---|---|---|
committer | Rouli <rouli.net@gmail.com> | 2013-02-28 13:28:42 +0200 |
commit | 35f36481b9f9a8050e0316600be168316b60d05e (patch) | |
tree | f2d17e4d3f4e638499a819c44158b6e0344f2168 /libmproxy/flow.py | |
parent | 53792a5a28df80552fdbedee3b88f204d94ad9ce (diff) | |
download | mitmproxy-35f36481b9f9a8050e0316600be168316b60d05e.tar.gz mitmproxy-35f36481b9f9a8050e0316600be168316b60d05e.tar.bz2 mitmproxy-35f36481b9f9a8050e0316600be168316b60d05e.zip |
adding __str__ to make export to har nicer
Diffstat (limited to 'libmproxy/flow.py')
-rw-r--r-- | libmproxy/flow.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libmproxy/flow.py b/libmproxy/flow.py index 9238cfbf..af97698c 100644 --- a/libmproxy/flow.py +++ b/libmproxy/flow.py @@ -812,6 +812,11 @@ class ClientConnect(controller.Msg): def __eq__(self, other): return self._get_state() == other._get_state() + def __str__(self): + if self.address: + return "%s:%d"%(self.address[0],self.address[1]) + return "None" + def _load_state(self, state): self.close = True self.error = state["error"] |