Skip to content

Commit 4561545

Browse files
committed
fixup! tweak printing of download instructions in obtain_file + remove dead code dealing with download instructions in fetch_source
Urlencoded characters (e.g. '%2F' instead of '/') caused an error while reporting download error.
1 parent 32690ba commit 4561545

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

easybuild/framework/easyblock.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,8 +883,10 @@ def obtain_file(self, filename, extension=False, urls=None, download_filename=No
883883
error_msg += "please follow the download instructions above, and make the file available "
884884
error_msg += "in the active source path (%s)" % ':'.join(source_paths())
885885
else:
886+
# flatten list to string with '%' characters escaped (literal '%' desired in 'sprintf')
887+
failedpaths_msg = ', '.join(failedpaths).replace('%', '%%')
886888
error_msg += "and downloading it didn't work either... "
887-
error_msg += "Paths attempted (in order): %s " % ', '.join(failedpaths)
889+
error_msg += "Paths attempted (in order): %s " % failedpaths_msg
888890

889891
raise EasyBuildError(error_msg, filename)
890892

0 commit comments

Comments
 (0)