aboutsummaryrefslogtreecommitdiff
path: root/pyasn1/type
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2017-07-30 11:26:01 +0200
committerIlya Etingof <etingof@gmail.com>2017-07-30 11:26:01 +0200
commit6fa0e312ea80713983b1a3c1e4529e7452b0e0fe (patch)
tree95e4b092659f9cd22d34e9a5dacfadde176ade51 /pyasn1/type
parent2b1c8a92567dca711f9f84ace210b31c268c5548 (diff)
downloadpyasn1-6fa0e312ea80713983b1a3c1e4529e7452b0e0fe.tar.gz
.isValue fixed to return True for empty SetOf/SequenceOf
Diffstat (limited to 'pyasn1/type')
-rw-r--r--pyasn1/type/univ.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pyasn1/type/univ.py b/pyasn1/type/univ.py
index c9d4558..74a14f1 100644
--- a/pyasn1/type/univ.py
+++ b/pyasn1/type/univ.py
@@ -1904,6 +1904,9 @@ class SequenceOfAndSetOfBase(base.AbstractConstructedAsn1Item):
In other words, if *isValue* is `True`, then the ASN.1 object is
initialized.
+ For the purpose of this check, empty |ASN.1| object is considered
+ as initialized.
+
Returns
-------
: :class:`bool`
@@ -1920,9 +1923,6 @@ class SequenceOfAndSetOfBase(base.AbstractConstructedAsn1Item):
The PyASN1 value objects can additionally participate in most
of built-in Python operations.
"""
- if not self._componentValues:
- return False
-
for componentValue in self._componentValues:
if not componentValue.isValue:
return False