summaryrefslogtreecommitdiff
path: root/pyasn1/type/univ.py
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2019-08-19 21:26:51 +0200
committerIlya Etingof <etingof@gmail.com>2019-08-24 21:37:51 +0200
commit41597f2e7f1820ab4e1c5b085da1f5e168df24bc (patch)
treee552f03ee7846566b4b036c192d9ed326a9e74a5 /pyasn1/type/univ.py
parentec580e545ef25f117573014d40ca5c512e58dbf3 (diff)
downloadpyasn1-git-41597f2e7f1820ab4e1c5b085da1f5e168df24bc.tar.gz
Add `isInconsistent` property hook to all constructed typesadd-consistency-check-hook
Added `isInconsistent` property to all constructed types. This property conceptually replaces `verifySizeSpec` method to serve a more general purpose e.g. ensuring all required fields are in a good shape. By default this check invokes subtype constraints verification and is run by codecs on value de/serialisation.
Diffstat (limited to 'pyasn1/type/univ.py')
-rw-r--r--pyasn1/type/univ.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pyasn1/type/univ.py b/pyasn1/type/univ.py
index b39c533..4f305f6 100644
--- a/pyasn1/type/univ.py
+++ b/pyasn1/type/univ.py
@@ -3004,7 +3004,7 @@ class Choice(Set):
if self._currentIdx is not None:
yield self.componentType[self._currentIdx].getName(), self[self._currentIdx]
- def verifySizeSpec(self):
+ def checkConsistency(self):
if self._currentIdx is None:
raise error.PyAsn1Error('Component not chosen')