diff options
Diffstat (limited to 'pyasn1/codec/ber/decoder.py')
-rw-r--r-- | pyasn1/codec/ber/decoder.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pyasn1/codec/ber/decoder.py b/pyasn1/codec/ber/decoder.py index db7301c..10b80eb 100644 --- a/pyasn1/codec/ber/decoder.py +++ b/pyasn1/codec/ber/decoder.py @@ -1443,6 +1443,9 @@ for typeDecoder in TAG_MAP.values(): stStop) = [x for x in range(10)] +EOO_SENTINEL = ints2octs((0, 0)) + + class SingleItemDecoder(object): defaultErrorState = stErrorCondition #defaultErrorState = stDumpRawValue @@ -1459,7 +1462,6 @@ class SingleItemDecoder(object): # Tag & TagSet objects caches self.__tagCache = {} self.__tagSetCache = {} - self.__eooSentinel = ints2octs((0, 0)) def __call__(self, substrate, asn1Spec=None, tagSet=None, length=None, state=stDecodeTag, @@ -1480,7 +1482,7 @@ class SingleItemDecoder(object): if isinstance(eoo_candidate, SubstrateUnderrunError): yield eoo_candidate - if eoo_candidate == self.__eooSentinel: + if eoo_candidate == EOO_SENTINEL: if LOG: LOG('end-of-octets sentinel found') yield eoo.endOfOctets |