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

github: deal with directory links correctly in file_info() #134

Merged
merged 1 commit into from
May 3, 2024

Conversation

dgw
Copy link
Member

@dgw dgw commented Apr 26, 2024

Getting the contents of a directory from the API returns a list, not a dict, so calling .get() on the resulting data fails.

Instead, make sure the data parsed to a Mapping first, then check if the 'type' within the JSON response was 'file' or not.

Getting the contents of a directory from the API returns a list, not a
dict, so calling `.get()` on the resulting data fails.

Instead, make sure the data parsed to a Mapping first, *then* check if
the 'type' within the JSON response was 'file' or not.
@dgw dgw added this to the 0.5.0 milestone Apr 26, 2024
@dgw dgw merged commit cb5baf2 into master May 3, 2024
@dgw dgw deleted the fix-directory-contents branch May 3, 2024 15:04
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.

1 participant