Skip to content

Commit ca6bd6f

Browse files
authored
Merge pull request #1 from JorisRommelse/patch-2
Update easyblock.py
2 parents 08af6ee + a32cb18 commit ca6bd6f

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

easybuild/framework/easyblock.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,21 @@ def collect_exts_file_info(self, fetch_files=True, verify_checksums=True):
830830
def obtain_file(self, filename, extension=False, urls=None, download_filename=None, force_download=False,
831831
git_config=None, no_download=False, download_instructions=None, alt_location=None,
832832
warning_only=False):
833+
try:
834+
return self.obtain_file_and_fail(filename, extension, urls, download_filename, force_download, git_config, no_download, download_instructions, alt_location, warning_only)
835+
except Exception as e:
836+
if build_option('fetch_continue'):
837+
if not urls:
838+
urls = ['NO_URL']
839+
print_warning(f"FAILED: File {filename} not found from {urls[0]}. Continuing ...")
840+
return 'NO_FILE_FOUND'
841+
else:
842+
raise
843+
844+
@_obtain_file_update_progress_bar_on_return
845+
def obtain_file_and_fail(self, filename, extension=False, urls=None, download_filename=None, force_download=False,
846+
git_config=None, no_download=False, download_instructions=None, alt_location=None,
847+
warning_only=False):
833848
"""
834849
Locate the file with the given name
835850
- searches in different subdirectories of source path

0 commit comments

Comments
 (0)