From a58ad9185841958da6b539def1458450a2b68d31 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Mon, 16 Apr 2018 15:55:38 +0300 Subject: [PATCH] Fix DecodePathDefBy workability with Python2 --- doc/news.rst | 1 + pyderasn.py | 3 +++ 2 files changed, 4 insertions(+) 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 -- 2.44.0