|
|
|
@ -723,7 +723,8 @@ class _IpList(object): |
|
|
|
|
|
|
|
@classmethod |
|
|
|
def process(cls, values): |
|
|
|
return values |
|
|
|
# Translating None into '' so that the list will be sortable in python3 |
|
|
|
return [v if v is not None else '' for v in values] |
|
|
|
|
|
|
|
|
|
|
|
class Ipv4List(_IpList): |
|
|
|
@ -918,6 +919,9 @@ class MxValue(object): |
|
|
|
'exchange': self.exchange, |
|
|
|
} |
|
|
|
|
|
|
|
def __hash__(self): |
|
|
|
return hash('{} {}'.format(self.preference, self.exchange)) |
|
|
|
|
|
|
|
def __eq__(self, other): |
|
|
|
return ((self.preference, self.exchange) == |
|
|
|
(other.preference, other.exchange)) |
|
|
|
@ -1010,6 +1014,9 @@ class NaptrValue(object): |
|
|
|
'replacement': self.replacement, |
|
|
|
} |
|
|
|
|
|
|
|
def __hash__(self): |
|
|
|
return hash(self.__repr__()) |
|
|
|
|
|
|
|
def __eq__(self, other): |
|
|
|
return ((self.order, self.preference, self.flags, self.service, |
|
|
|
self.regexp, self.replacement) == |
|
|
|
@ -1145,6 +1152,9 @@ class SshfpValue(object): |
|
|
|
'fingerprint': self.fingerprint, |
|
|
|
} |
|
|
|
|
|
|
|
def __hash__(self): |
|
|
|
return hash(self.__repr__()) |
|
|
|
|
|
|
|
def __eq__(self, other): |
|
|
|
return ((self.algorithm, self.fingerprint_type, self.fingerprint) == |
|
|
|
(other.algorithm, other.fingerprint_type, other.fingerprint)) |
|
|
|
@ -1283,6 +1293,9 @@ class SrvValue(object): |
|
|
|
'target': self.target, |
|
|
|
} |
|
|
|
|
|
|
|
def __hash__(self): |
|
|
|
return hash(self.__repr__()) |
|
|
|
|
|
|
|
def __eq__(self, other): |
|
|
|
return ((self.priority, self.weight, self.port, self.target) == |
|
|
|
(other.priority, other.weight, other.port, other.target)) |
|
|
|
|