sopel-irc / sopel-github

GitHub plugin for Sopel
Other
3 stars 13 forks source link

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

Closed dgw closed 4 months ago

dgw commented 4 months ago

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.