Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid using requests's JSONDecodeError
This exception is only present in "recent" version of requests, typically not in the version distributed by Debian bullseye. Since requests' JSONDecodeError is in general a subclass of json.JSONDecodeError, we use the latter, but also handle the plain ValueError (which json.JSONDecodeError is a subclass of) because requests might use simplejson (which uses its own JSONDecodeError, also a subclass of ValueError).
- Loading branch information