Skip to content

Commit 8083782

Browse files
committed
Catch errors on fetching Julia versions
1 parent fc6ea2d commit 8083782

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

repo2docker/buildpacks/julia/julia_project.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@ class JuliaProjectTomlBuildPack(PythonBuildPack):
1818
@property
1919
@functools.lru_cache(maxsize=1)
2020
def all_julias(self):
21-
json = requests.get(
22-
"https://julialang-s3.julialang.org/bin/versions.json"
23-
).json()
21+
try:
22+
json = requests.get(
23+
"https://julialang-s3.julialang.org/bin/versions.json"
24+
).json()
25+
except Exception as e:
26+
raise RuntimeError("Failed to fetch available Julia versions: {e}")
2427
vers = [semver.VersionInfo.parse(v) for v in json.keys()]
2528
# filter out pre-release versions not supported by find_semver_match()
2629
filtered_vers = [v for v in vers if v.prerelease is None]

0 commit comments

Comments
 (0)