From: Sergey Matveev Date: Mon, 16 Dec 2019 10:47:12 +0000 (+0300) Subject: Do not shadow DecodeError for optional field X-Git-Tag: 5.4^0 X-Git-Url: http://www.git.cypherpunks.ru/?p=pyderasn.git;a=commitdiff_plain;h=597f028b5d602b4af53830ac682078aa5fb59e38 Do not shadow DecodeError for optional field --- diff --git a/VERSION b/VERSION index d346e2a..37c2d99 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.3 +5.4 diff --git a/doc/install.rst b/doc/install.rst index 179c303..d03034c 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -4,11 +4,11 @@ Install Preferable way is to :ref:`download ` tarball with the signature from `official website `__:: - $ wget http://pyderasn.cypherpunks.ru/pyderasn-3.13.tar.xz - $ wget http://pyderasn.cypherpunks.ru/pyderasn-3.13.tar.xz.sig - $ gpg --verify pyderasn-3.13.tar.xz.sig pyderasn-3.13.tar.xz - $ xz -d < pyderasn-3.13.tar.xz | tar xf - - $ cd pyderasn-3.13 + $ [fetch|wget] http://pyderasn.cypherpunks.ru/pyderasn-|VERSION|.tar.xz + $ [fetch|wget] http://pyderasn.cypherpunks.ru/pyderasn-5.4.tar.xz.sig + $ gpg --verify pyderasn-5.4.tar.xz.sig pyderasn-5.4.tar.xz + $ xz --decompress --stdout pyderasn-5.4.tar.xz | tar xf - + $ cd pyderasn-5.4 $ python setup.py install # or copy pyderasn.py (+six.py, possibly termcolor.py) to your PYTHONPATH diff --git a/doc/news.rst b/doc/news.rst index a2a45da..7203dde 100644 --- a/doc/news.rst +++ b/doc/news.rst @@ -1,6 +1,13 @@ News ==== +.. _release5.4: + +5.4 +--- +* Do not shadow underlying ``DecodeError`` during decoding of optional + sequence's field + .. _release5.3: 5.3 diff --git a/makedist.sh b/makedist.sh index 0441cfc..7d63461 100755 --- a/makedist.sh +++ b/makedist.sh @@ -15,10 +15,10 @@ tar cfI - $tmp/includes | tar xfC - $tmp/pyderasn-"$release" PYTHONPATH="$tmp/pyderasn-$release" make -C $tmp/pyderasn-"$release"/doc -tar xvfC doc/download/six-*.tar.xz $tmp --include "*/*six.py" +tar xvfC doc/download/six-1.13.0.tar.xz $tmp --include "*/*six.py" mv -v $tmp/six-*/*six.py $tmp/pyderasn-"$release" -tar xvfC doc/download/termcolor-*.tar.xz $tmp --include "*/termcolor.py" +tar xvfC doc/download/termcolor-1.1.0.tar.xz $tmp --include "*/termcolor.py" mv -v $tmp/termcolor-*/termcolor.py $tmp/pyderasn-"$release" cd $tmp diff --git a/pyderasn.py b/pyderasn.py index c2d8f44..e8e200c 100755 --- a/pyderasn.py +++ b/pyderasn.py @@ -4885,8 +4885,8 @@ class Sequence(Obj): ctx=ctx, _ctx_immutable=False, ) - except TagMismatch: - if spec.optional: + except TagMismatch as err: + if (len(err.decode_path) == len(decode_path) + 1) and spec.optional: continue raise