Skip to content

Commit

Permalink
allow empty upstream URL
Browse files Browse the repository at this point in the history
This fixes an bug brought by #31 that affects latest download:

`jill install latest --upstream BFSU`
  • Loading branch information
johnnychen94 committed May 28, 2020
1 parent 819fb63 commit d1f600f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion jill/utils/source_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def get_url(self, plain_version, system, architecture):
url_list = [t.substitute(**configs) for t in template_lists]
url_list.sort(key=lambda url:
self.latencies[urlparse(url).netloc])
return url_list[0]
return url_list[0] if url_list else ""


def read_registry():
Expand Down Expand Up @@ -184,6 +184,7 @@ def _get_urls(self, plain_version, system, architecture):
"""
url_list = [src.get_url(plain_version, system, architecture)
for src in self.registry.values()]
url_list = [url for url in url_list if url]
url_list.sort(key=lambda url:
self.latencies[urlparse(url).netloc])
return url_list
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

setuptools.setup(
name='jill',
version='0.6.10',
version='0.6.11',
author="Johnny Chen",
author_email="[email protected]",
description="JILL -- Julia Installer for Linux (MacOS, Windows and FreeBSD) -- Light",
Expand Down

0 comments on commit d1f600f

Please sign in to comment.