mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
add tcp.Address.__hash__
This commit is contained in:
parent
fc86bbd03e
commit
32b3c32138
@ -352,6 +352,9 @@ class Address(object):
|
|||||||
def __ne__(self, other):
|
def __ne__(self, other):
|
||||||
return not self.__eq__(other)
|
return not self.__eq__(other)
|
||||||
|
|
||||||
|
def __hash__(self):
|
||||||
|
return hash(self.address) ^ 42 # different hash than the tuple alone.
|
||||||
|
|
||||||
|
|
||||||
def close_socket(sock):
|
def close_socket(sock):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user