diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-09-08 21:31:27 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-09-08 21:31:27 +0200 |
commit | 32b3c32138847cb1f5b0c1958fc9ad0a49f8810f (patch) | |
tree | 25520a4843601a9c1de3d5b06f4d16fa452037aa /netlib | |
parent | fc86bbd03e7806bf5d3dc0d226b607192642c810 (diff) | |
download | mitmproxy-32b3c32138847cb1f5b0c1958fc9ad0a49f8810f.tar.gz mitmproxy-32b3c32138847cb1f5b0c1958fc9ad0a49f8810f.tar.bz2 mitmproxy-32b3c32138847cb1f5b0c1958fc9ad0a49f8810f.zip |
add tcp.Address.__hash__
Diffstat (limited to 'netlib')
-rw-r--r-- | netlib/tcp.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/netlib/tcp.py b/netlib/tcp.py index 0d83816b..5c9d26de 100644 --- a/netlib/tcp.py +++ b/netlib/tcp.py @@ -352,6 +352,9 @@ class Address(object): def __ne__(self, other): return not self.__eq__(other) + def __hash__(self): + return hash(self.address) ^ 42 # different hash than the tuple alone. + def close_socket(sock): """ |