Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pyasn1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenVMS
Python
Modules
pyasn1
Commits
13067380249e
Commit
13067380249e
authored
5 years ago
by
Jan Pipek
Browse files
Options
Downloads
Patches
Plain Diff
Hide other auxiliary functions.
parent
4329c4c1b263
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyasn1/codec/ber/decoder.py
+4
-4
4 additions, 4 deletions
pyasn1/codec/ber/decoder.py
with
4 additions
and
4 deletions
pyasn1/codec/ber/decoder.py
+
4
−
4
View file @
13067380
...
@@ -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
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment