Skip to content
Snippets Groups Projects
Commit 13067380249e authored by Jan Pipek's avatar Jan Pipek
Browse files

Hide other auxiliary functions.

parent 4329c4c1b263
No related branches found
No related tags found
No related merge requests found
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
raise UnsupportedSubstrateError("Cannot convert " + substrate.__class__.__name__ + " to a seekable bit stream.") 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. """Check whether we have reached the end of a stream.
Although it is more effective to read and catch exceptions, this Although it is more effective to read and catch exceptions, this
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
return not substrate.peek(1) return not substrate.peek(1)
def peek(substrate, size=-1): def _peek(substrate, size=-1):
"""Peek the stream. """Peek the stream.
Parameters Parameters
...@@ -297,7 +297,7 @@ ...@@ -297,7 +297,7 @@
return substrateFun(self._createComponent( return substrateFun(self._createComponent(
asn1Spec, tagSet, noValue, **options), substrate, length) 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') raise error.PyAsn1Error('Empty BIT STRING substrate')
if tagSet[0].tagFormat == tag.tagFormatSimple: # XXX what tag to check? if tagSet[0].tagFormat == tag.tagFormatSimple: # XXX what tag to check?
...@@ -1226,7 +1226,7 @@ ...@@ -1226,7 +1226,7 @@
length += (currentPosition - fullPosition) length += (currentPosition - fullPosition)
if LOG: 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: if substrateFun:
return substrateFun(self._createComponent(asn1Spec, tagSet, noValue, **options), return substrateFun(self._createComponent(asn1Spec, tagSet, noValue, **options),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment