Skip to content

Commit c7e21b3

Browse files
committed
Keep support for old urls for now
1 parent c0918a1 commit c7e21b3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

relenv/fetch.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,13 @@ def fetch(version, triplet, python, check_hosts=CHECK_HOSTS):
5151
"""
5252
Fetch the specified python build.
5353
"""
54-
for host in check_hosts:
54+
try:
5555
url = f"https://github.com/saltstack/relenv/releases/download/v{version}/{python}-{triplet}.tar.xz"
56-
if check_url(url, timeout=5):
57-
break
56+
if not check_url(url, timeout=5):
57+
for host in check_hosts:
58+
url = f"https://{host}/relenv/{version}/build/{python}-{triplet}.tar.xz"
59+
if check_url(url, timeout=5):
60+
break
5861
else:
5962
print(f"Unable to find file on any hosts {' '.join(check_hosts)}")
6063
sys.exit(1)

0 commit comments

Comments
 (0)