Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EdosL0Util
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
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
SIPS
EdosL0Util
Commits
4b7059f3
Commit
4b7059f3
authored
3 years ago
by
Bruce Flynn
Browse files
Options
Downloads
Patches
Plain Diff
trunc: catch stopiter
parent
93b7650e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
edosl0util/trunc.py
+8
-2
8 additions, 2 deletions
edosl0util/trunc.py
with
8 additions
and
2 deletions
edosl0util/trunc.py
+
8
−
2
View file @
4b7059f3
...
@@ -13,10 +13,16 @@ def trunc_stream(stream, start, end):
...
@@ -13,10 +13,16 @@ def trunc_stream(stream, start, end):
# first pkt in group
# first pkt in group
yield
pkt
yield
pkt
# following pkts in group
# following pkts in group
pkt
=
stream
.
next
()
try
:
pkt
=
stream
.
next
()
except
StopIteration
:
return
while
pkt
.
stamp
is
None
:
while
pkt
.
stamp
is
None
:
yield
pkt
yield
pkt
pkt
=
stream
.
next
()
try
:
pkt
=
stream
.
next
()
except
StopIteration
:
return
def
trunc_file
(
filename
,
start
,
end
,
stream_impl
=
jpss_packet_stream
):
def
trunc_file
(
filename
,
start
,
end
,
stream_impl
=
jpss_packet_stream
):
...
...
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