We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2fbe57 commit 2dd5529Copy full SHA for 2dd5529
publish.py
@@ -32,9 +32,10 @@
32
33
def already_published(name, version):
34
try:
35
- urllib.request.urlopen('https://crates.io/api/v1/crates/%s/%s/download' % (name, version))
+ urllib.request.urlopen('https://static.crates.io/crates/%s/%s/download' % (name, version))
36
except HTTPError as e:
37
- if e.code == 404:
+ # 403 and 404 are common responses to assume it is not published
38
+ if 400 <= e.code < 500:
39
return False
40
raise
41
return True
0 commit comments