]> Cypherpunks.ru repositories - pyderasn.git/commitdiff
Do not shadow DecodeError for optional field 5.4
authorSergey Matveev <stargrave@stargrave.org>
Mon, 16 Dec 2019 10:47:12 +0000 (13:47 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Mon, 16 Dec 2019 10:47:12 +0000 (13:47 +0300)
VERSION
doc/install.rst
doc/news.rst
makedist.sh
pyderasn.py

diff --git a/VERSION b/VERSION
index d346e2ab7f2109b12c9bf53299bbbf6e7527fe7f..37c2d9960ec72414b3941f8f4c1172fb6e3c6e7f 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5.3
+5.4
index 179c3035b4d6fb835ecc130d9d4b353502c24fcf..d03034c86d7a835662d24c0ad5930635521d5ce3 100644 (file)
@@ -4,11 +4,11 @@ Install
 Preferable way is to :ref:`download <download>` tarball with the
 signature from `official website <http://pyderasn.cypherpunks.ru/>`__::
 
-    $ 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
 
index a2a45dab532a2e6c49fd567fbf4d2006053c1706..7203dded13e22a8226c58d061a2be4e30b6e8088 100644 (file)
@@ -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
index 0441cfc8e874561c6d99d86911885b417e79605a..7d63461754221ab63faed0c8e1cdb70035f0c74b 100755 (executable)
@@ -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
index c2d8f4409ee9f8d7b50a75956ed5d03a72b08db5..e8e200c69196820912b314f0fa7e84844eeb47d0 100755 (executable)
@@ -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