Skip to content

Commit 1145a07

Browse files
authored
remember that sources can be a dict
1 parent 57f5f81 commit 1145a07

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

easybuild/framework/easyblock.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2704,21 +2704,27 @@ def check_checksums_for(self, ent, sub='', source_cnt=None):
27042704
# try to get value with templates resolved, but fall back to not resolving templates;
27052705
# this is better for error reporting that includes names of source files
27062706
try:
2707-
sources = ent.get('sources', []) + ent.get('data_sources', [])
2707+
sources = ent.get('sources', [])
2708+
data_sources = ent.get('data_sources', [])
27082709
patches = ent.get('patches', []) + ent.get('postinstallpatches', [])
27092710
checksums = ent.get('checksums', [])
27102711
except EasyBuildError:
27112712
if isinstance(ent, EasyConfig):
2712-
sources = ent.get_ref('sources') + ent.get_ref('data_sources')
2713+
sources = ent.get_ref('sources')
2714+
data_sources = ent.get_ref('data_sources')
27132715
patches = ent.get_ref('patches') + ent.get_ref('postinstallpatches')
27142716
checksums = ent.get_ref('checksums')
27152717

27162718
# Single source should be re-wrapped as a list, and checksums with it
27172719
if isinstance(sources, dict):
27182720
sources = [sources]
2721+
if isinstance(data_sources, dict):
2722+
data_sources = [data_sources]
27192723
if isinstance(checksums, str):
27202724
checksums = [checksums]
27212725

2726+
sources = sources + data_sources
2727+
27222728
if not checksums:
27232729
checksums_from_json = self.get_checksums_from_json()
27242730
# recreate a list of checksums. If each filename is found, the generated list of checksums should match

0 commit comments

Comments
 (0)