Use proper timeouts for requests + better error handling
Default behaviour apparently is blocking, we never want that! Also make error responses actually raise an exception.
This commit is contained in:
1 parent
9bcce4e56a
commit
bba9d6cc18
6 files changed
+11
-8
No files matched your search
@@ -85,7 +85,7 @@ def _get_latest_release(user, repo, compare_type,
|
||||
prerelease_channel=None,
|
||||
force_base=True):
|
||||
nothing = None, None, None
|
||||
r = requests.get(RELEASE_URL.format(user=user, repo=repo))
|
||||
r = requests.get(RELEASE_URL.format(user=user, repo=repo), timeout=30)
|
||||
|
||||
from . import log_github_ratelimit
|
||||
log_github_ratelimit(logger, r)
|
||||
|
||||
Reference in new issue
Block a user