mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +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):
|
||||
return not self.__eq__(other)
|
||||
|
||||
def __hash__(self):
|
||||
return hash(self.address) ^ 42 # different hash than the tuple alone.
|
||||
|
||||
|
||||
def close_socket(sock):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user