From: Sergey Matveev Date: Mon, 16 Apr 2018 12:55:38 +0000 (+0300) Subject: Fix DecodePathDefBy workability with Python2 X-Git-Tag: 3.4^0 X-Git-Url: http://www.git.cypherpunks.ru/?p=pyderasn.git;a=commitdiff_plain;h=a58ad9185841958da6b539def1458450a2b68d31 Fix DecodePathDefBy workability with Python2 --- diff --git a/doc/news.rst b/doc/news.rst index db063a6..8e82120 100644 --- a/doc/news.rst +++ b/doc/news.rst @@ -8,6 +8,7 @@ News * Strict NumericString's value sanitation * Invalid encoding in string types will raise ``DecodeError`` exception, instead of ``Unicode*Error`` +* Fixed DecodePathDefBy workability with Python 2.x .. _release3.3: diff --git a/pyderasn.py b/pyderasn.py index 3b5c4d8..0c7812c 100755 --- a/pyderasn.py +++ b/pyderasn.py @@ -1018,6 +1018,9 @@ class DecodePathDefBy(object): def __init__(self, defined_by): self.defined_by = defined_by + def __ne__(self, their): + return not(self == their) + def __eq__(self, their): if not isinstance(their, self.__class__): return False