diff options
| author | Maximilian Hils <git@maximilianhils.com> | 2015-05-18 17:16:42 +0200 | 
|---|---|---|
| committer | Maximilian Hils <git@maximilianhils.com> | 2015-05-18 17:16:42 +0200 | 
| commit | 46fadfc82386265c26b77ea0d8c3801585c84fbc (patch) | |
| tree | 02c34cd97820037134b686c1e5a32f742a7468f9 /netlib | |
| parent | f40bf865b1e767d4f15e0e829b9ca3132c33d11d (diff) | |
| download | mitmproxy-46fadfc82386265c26b77ea0d8c3801585c84fbc.tar.gz mitmproxy-46fadfc82386265c26b77ea0d8c3801585c84fbc.tar.bz2 mitmproxy-46fadfc82386265c26b77ea0d8c3801585c84fbc.zip | |
improve displaying tcp addresses
Diffstat (limited to 'netlib')
| -rw-r--r-- | netlib/tcp.py | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/netlib/tcp.py b/netlib/tcp.py index dbe114a1..a5f43ea3 100644 --- a/netlib/tcp.py +++ b/netlib/tcp.py @@ -245,7 +245,10 @@ class Address(object):          self.family = socket.AF_INET6 if b else socket.AF_INET      def __repr__(self): -        return repr(self.address) +        return "{}:{}".format(self.host, self.port) + +    def __str__(self): +        return str(self.address)      def __eq__(self, other):          other = Address.wrap(other) | 
