X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=pyderasn.py;h=fcaa5a6cdcce2e4057305b5cc37f0c9ffa164913;hb=f7a92debecda42633ba9a7c320eaaa81871a4d49;hp=ed5b763ccef4123c790d52569d9b376ef2acf168;hpb=ad6ac8681ad5479b7274165a056624433e0ca2f1;p=pyderasn.git diff --git a/pyderasn.py b/pyderasn.py index ed5b763..fcaa5a6 100755 --- a/pyderasn.py +++ b/pyderasn.py @@ -666,6 +666,7 @@ from math import ceil from os import environ from string import ascii_letters from string import digits +from sys import version_info from unicodedata import category as unicat from six import add_metaclass @@ -690,7 +691,7 @@ except ImportError: # pragma: no cover def colored(what, *args, **kwargs): return what -__version__ = "6.2" +__version__ = "6.3" __all__ = ( "Any", @@ -764,7 +765,7 @@ EOC = b"\x00\x00" EOC_LEN = len(EOC) LENINDEF = b"\x80" # length indefinite mark LENINDEF_PP_CHAR = "I" if PY2 else "∞" -NAMEDTUPLE_KWARGS = {} if PY2 else {"module": __name__} +NAMEDTUPLE_KWARGS = {} if version_info < (3, 6) else {"module": __name__} SET01 = frozenset("01") DECIMALS = frozenset(digits) DECIMAL_SIGNS = ".," @@ -5133,7 +5134,7 @@ def get_def_by_path(defines_by_path, sub_decode_path): if len(path) != len(sub_decode_path): continue for p1, p2 in zip(path, sub_decode_path): - if (p1 != any) and (p1 != p2): + if (not p1 is any) and (p1 != p2): break else: return define