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

Respect onerror='return' in AzureBlobFileSystem.cat #350

Closed
wants to merge 1 commit into from

Conversation

ErlendHaa
Copy link
Contributor

Hi!

I noticed that the AzureBlobFileSystem.cat does not respect the onerror='return' (and 'omit'). Essentially, none-existing paths are always removed from the out set. This also causes problems upstream, e.g. in fspec.FSmap.getitems [1] because this method expects to filter the path's itself. The result is a KeyError every time the key-set includes none-existing blob.

This commits adds an option to keep paths in the output set of
AzureBlobFileSystem._expand_path even when the blob doesn't exist.

This change is motivated by the onerror='return' option in cat, one of
the callers of _expand_path (or expand_path). The stripping of
none-existing paths undermines the onerror='return' and onerror='omit'
in cat.
@hayesgb
Copy link
Collaborator

hayesgb commented Oct 1, 2022

Thanks for this contribution @ErlendHaa! It was failing the linter. I patch this and merged your changes in.

@hayesgb hayesgb closed this Oct 1, 2022
@ErlendHaa
Copy link
Contributor Author

Hi again! as far as I can see #353 did not include this change?

@tasansal
Copy link

@hayesgb I checked the main branch, I don't see these changes either. The #353 didn't capture changes by @ErlendHaa, which is strange, it was based on his fork.

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.

3 participants