Skip to content

Handle packet stream EOF without StopIteration#15

Open
keilogic wants to merge 1 commit into
SuperCowPowers:masterfrom
keilogic:python3-generator-return
Open

Handle packet stream EOF without StopIteration#15
keilogic wants to merge 1 commit into
SuperCowPowers:masterfrom
keilogic:python3-generator-return

Conversation

@keilogic

@keilogic keilogic commented Jun 1, 2026

Copy link
Copy Markdown

Summary

  • catch StopIteration from pcap.next() and end PacketStreamer.read_interface() normally
  • keep the existing not header EOF path and packet stats reporting intact

Tests

  • python -m py_compile chains\sources\packet_streamer.py
  • python -m flake8 chains\sources\packet_streamer.py --max-line-length=140
  • fake-pcapy runtime probe: pcap.next() raises StopIteration, list(streamer.output_stream) returns [] without a generator RuntimeError
  • git diff --check

Fixes #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

For Python3 we need to NOT raise StopIteration

1 participant