Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Grund <Flamefire@users.noreply.github.com>
  • Loading branch information
joeydumont and Flamefire authored Sep 29, 2022
1 parent de9ed77 commit 53f3f53
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions easybuild/framework/easyblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,12 +822,11 @@ def obtain_file(self, filename, extension=False, urls=None, download_filename=No

# add extra-source-urls CLI as either a first check, or a fallback.
for url in build_option("extra_source_urls"):
index = (
0
if build_option("extra_source_urls_priority") == EXTRA_SOURCE_URLS_PRIMARY
else len(source_urls)
)
source_urls.insert(index, url + "/" + os.path.join(name_letter, location))
url += "/" + name_letter + "/" + location
if build_option("extra_source_urls_priority") == EXTRA_SOURCE_URLS_PRIMARY:
source_urls.insert(0, url)
else:
source_urls.append(url)

mkdir(targetdir, parents=True)

Expand Down
2 changes: 1 addition & 1 deletion easybuild/tools/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def override_options(self):
None, 'store_true', False),
'extra-modules': ("List of extra modules to load after setting up the build environment",
'strlist', 'extend', None),
"extra-source-urls": ("Specify different URLs to fetch sources from", "strlist", "store",
"extra-source-urls": ("Specify URLs to fetch sources from in addition to those in the easyconfig", "strlist", "store",
DEFAULT_EXTRA_SOURCE_URLS),
"extra-source-urls-priority": ("Specify whether sources-url should be tried before or after the "
"ones defined in the easyconfigs", "choice", "store_or_None",
Expand Down

0 comments on commit 53f3f53

Please sign in to comment.