Skip to content

Commit

Permalink
Summarize tar error from test packet
Browse files Browse the repository at this point in the history
Fixes #14
  • Loading branch information
peterstory committed Jun 6, 2024
1 parent 41d21a0 commit dae221e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/pydiode/tar.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ def main():
# This can happen when pydiode's STDOUT is connected to tar's
# STDIN, and pydiode exits without output.
sys.exit(0)
elif str(e) == "truncated header":
print(
"Invalid header. Did you send a test packet?",
file=sys.stderr,
)
sys.exit(1)
else:
raise e
# If you attempt to write to a directory without write access
Expand Down

0 comments on commit dae221e

Please sign in to comment.