summaryrefslogtreecommitdiff
path: root/pyasn1
diff options
context:
space:
mode:
authorJan Pipek <jan.pipek@gmail.com>2019-09-13 11:54:27 +0200
committerIlya Etingof <etingof@gmail.com>2019-11-15 19:31:42 +0100
commit21eb5309fe3c2737b1e2b00f185ae791b5afbe3a (patch)
tree6e4494b29842f7a401c4bb5318ad17eb3fcea319 /pyasn1
parentc547dde3fa555795c6b42c043eea792d390085a9 (diff)
downloadpyasn1-git-21eb5309fe3c2737b1e2b00f185ae791b5afbe3a.tar.gz
Hide other auxiliary functions.
Diffstat (limited to 'pyasn1')
-rw-r--r--pyasn1/codec/ber/decoder.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pyasn1/codec/ber/decoder.py b/pyasn1/codec/ber/decoder.py
index 3d97e64..9a87e86 100644
--- a/pyasn1/codec/ber/decoder.py
+++ b/pyasn1/codec/ber/decoder.py
@@ -120,7 +120,7 @@ def _asSeekableStream(substrate):
raise UnsupportedSubstrateError("Cannot convert " + substrate.__class__.__name__ + " to a seekable bit stream.")
-def endOfStream(substrate):
+def _endOfStream(substrate):
"""Check whether we have reached the end of a stream.
Although it is more effective to read and catch exceptions, this
@@ -145,7 +145,7 @@ def endOfStream(substrate):
return not substrate.peek(1)
-def peek(substrate, size=-1):
+def _peek(substrate, size=-1):
"""Peek the stream.
Parameters
@@ -297,7 +297,7 @@ class BitStringDecoder(AbstractSimpleDecoder):
return substrateFun(self._createComponent(
asn1Spec, tagSet, noValue, **options), substrate, length)
- if not length or endOfStream(substrate):
+ if not length or _endOfStream(substrate):
raise error.PyAsn1Error('Empty BIT STRING substrate')
if tagSet[0].tagFormat == tag.tagFormatSimple: # XXX what tag to check?
@@ -1254,7 +1254,7 @@ class AnyDecoder(AbstractSimpleDecoder):
length += (currentPosition - fullPosition)
if LOG:
- LOG('decoding as untagged ANY, substrate %s' % debug.hexdump(peek(substrate, length)))
+ LOG('decoding as untagged ANY, substrate %s' % debug.hexdump(_peek(substrate, length)))
if substrateFun:
return substrateFun(self._createComponent(asn1Spec, tagSet, noValue, **options),