mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
fix tcp.Address inequality comparison
This commit is contained in:
parent
3d489f3bb7
commit
ec628bc37d
@ -216,10 +216,16 @@ class Address(object):
|
||||
def use_ipv6(self, b):
|
||||
self.family = socket.AF_INET6 if b else socket.AF_INET
|
||||
|
||||
def __repr__(self):
|
||||
return repr(self.address)
|
||||
|
||||
def __eq__(self, other):
|
||||
other = Address.wrap(other)
|
||||
return (self.address, self.family) == (other.address, other.family)
|
||||
|
||||
def __ne__(self, other):
|
||||
return not self.__eq__(other)
|
||||
|
||||
|
||||
class _Connection(object):
|
||||
def get_current_cipher(self):
|
||||
|
Loading…
Reference in New Issue
Block a user