summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Matveev <stargrave@stargrave.org>2018-09-12 21:53:28 +0300
committerSergey Matveev <stargrave@stargrave.org>2018-09-12 23:05:58 +0300
commit795d767d71d08311fe4e57efaa7521455db1d574 (patch)
tree8211fe921c35486ae42dd6201167c9968eb9661e
parent29b9fb6114e2808e7964c014e1b67ff95fc0b615 (diff)
downloadpyderasn-795d767d71d08311fe4e57efaa7521455db1d574.tar.xz
CHOICE should proxy lenindef/bered attributed of underlying object
-rwxr-xr-xpyderasn.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pyderasn.py b/pyderasn.py
index 607ca50..2213e78 100755
--- a/pyderasn.py
+++ b/pyderasn.py
@@ -3962,6 +3962,8 @@ class Choice(Obj):
_decoded=(offset, 0, value.fulllen),
)
obj._value = (choice, value)
+ obj.lenindef = value.lenindef
+ obj.bered = value.bered
return obj, tail
def __repr__(self):
@@ -3985,6 +3987,8 @@ class Choice(Obj):
llen=self.llen,
vlen=self.vlen,
expl_lenindef=self.expl_lenindef,
+ lenindef=self.lenindef,
+ bered=self.bered,
)
if self.ready:
yield self.value.pps(decode_path=decode_path + (self.choice,))