Skip to content

defer tshark check from import time to runtime - #25

Merged
Rameen-Mahmood merged 1 commit into
mainfrom
fix/defer-tshark-check
Mar 27, 2026
Merged

Rameen-Mahmood merged 1 commit into
mainfrom
fix/defer-tshark-check

Conversation

@Rameen-Mahmood

Copy link
Copy Markdown
Member

Changes

  • moved tshark detection from module-level into a _find_tshark() helper called at runtime
  • previously, import pcap_parser would sys.exit() if tshark was not installed, making the package unusable as a library and breaking flow.py (which does not need tshark)
  • run_tshark and extract_dhcp_hostnames now accept an optional tshark_path param, looked up lazily by default

Testing

  • all 27 tests pass
  • backwards compatible, existing callers do not need to change

@Rameen-Mahmood
Rameen-Mahmood merged commit 5ff4c5c into main Mar 27, 2026
5 checks passed
@Rameen-Mahmood
Rameen-Mahmood deleted the fix/defer-tshark-check branch March 27, 2026 14:51
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.

1 participant