mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-12-03 12:23:46 +00:00
make inequality comparison work
This commit is contained in:
parent
ef0e501877
commit
d9a731b23a
@ -285,6 +285,9 @@ class SSLCert:
|
||||
def __eq__(self, other):
|
||||
return self.digest("sha1") == other.digest("sha1")
|
||||
|
||||
def __ne__(self, other):
|
||||
return not self.__eq__(other)
|
||||
|
||||
@classmethod
|
||||
def from_pem(klass, txt):
|
||||
x509 = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, txt)
|
||||
|
@ -24,6 +24,9 @@ class ODict:
|
||||
def __eq__(self, other):
|
||||
return self.lst == other.lst
|
||||
|
||||
def __ne__(self, other):
|
||||
return not self.__eq__(other)
|
||||
|
||||
def __iter__(self):
|
||||
return self.lst.__iter__()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user