Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exit with cleaner message when no entries are expected in the ZIM #338

Merged
merged 2 commits into from
Jun 27, 2024

Conversation

benoit74
Copy link
Collaborator

@benoit74 benoit74 commented Jun 25, 2024

Fix #336
Fix #337

Changes:

  • add custom exception class for situations in gather_information_from_warc where we know that WARC is not processable
  • detect when there is 0 processable entry in the ZIM
  • detect when main entry is not processable and stop immediately
  • log these errors and exit accordingly, no need to display the stack trace in these situations

@benoit74 benoit74 self-assigned this Jun 25, 2024
@benoit74 benoit74 force-pushed the zero_entries branch 2 times, most recently from d9cfc05 to 94ad961 Compare June 25, 2024 14:17
@benoit74 benoit74 marked this pull request as ready for review June 25, 2024 14:46
@benoit74 benoit74 requested a review from rgaudin June 25, 2024 14:46
Copy link
Member

@rgaudin rgaudin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

src/warc2zim/converter.py Outdated Show resolved Hide resolved
@benoit74 benoit74 merged commit 5ea9e97 into main Jun 27, 2024
5 checks passed
@benoit74 benoit74 deleted the zero_entries branch June 27, 2024 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants