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

Allow fetch.txt with file URLs to validate #154

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

avivace
Copy link
Contributor

@avivace avivace commented Nov 19, 2021

It looks like it passes all the tests (python setup.py test doesn't return any error) and it also succeds to validate the bag I added in LibraryOfCongress/bagit-conformance-suite#14 with this kind of entries in the fetch.txt:

file:///home/avivace/cern/example_bags/source/sachiel.png 42000 sachiel.png

It should effectively fix #153.

The fetch.txt validation now passes when:

  • The URL scheme resolves to "file" after parsing (no value need for netloc in this case)
  • The schema resolves to anything AND the netloc has a value too
if not (all((parsed_url.scheme, parsed_url.netloc)) or parsed_url.scheme == "file"):

Unverified

This user has not yet uploaded their public signing key.
@acdha acdha merged commit cc9b366 into LibraryOfCongress:master Mar 22, 2024
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.

fetch.txt validation fails with file://<PATH> lines
2 participants