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

Skip first line of the "JSON" file #996

Merged
merged 2 commits into from
Sep 4, 2023
Merged

Skip first line of the "JSON" file #996

merged 2 commits into from
Sep 4, 2023

Conversation

barthalion
Copy link
Contributor

ArchiveBox moves the file to parse to the sources directory and adds the
original filename at the top, making the file invalid.

ArchiveBox moves the file to parse to the sources directory and adds the
original filename at the top, making the file invalid.
@lgtm-com
Copy link

lgtm-com bot commented Jul 5, 2022

This pull request introduces 1 alert when merging eb97fd4 into 03eb7e5 - view on LGTM.com

new alerts:

  • 1 for Unguarded next in generator

@pirate
Copy link
Member

pirate commented Jan 10, 2023

Can you add an if ...: next(file) condition in there to check for this specific case? e.g.

if peekfirstline(file).strip()[0] != "{":
    next(file)  # skip first line if it doesnt start with {

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.

2 participants