diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 5f1fffaf6d..c28997bc22 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -2584,23 +2584,17 @@ def check_checksums_for(self, ent, sub='', source_cnt=None): ec_fn = os.path.basename(self.cfg.path) checksum_issues = [] - if isinstance(ent, EasyConfig): - # try to get value with templates resolved, but fall back to not resolving templates; - # this is better for error reporting that includes names of source files - try: - sources = ent.get('sources', []) - patches = ent.get('patches', []) + ent.get('postinstallpatches', []) - checksums = ent.get('checksums', []) - except EasyBuildError: - sources = ent.get_ref('sources') - patches = ent.get_ref('patches') + ent.get_ref('postinstallpatches') - checksums = ent.get_ref('checksums') - elif isinstance(ent, dict): + # try to get value with templates resolved, but fall back to not resolving templates; + # this is better for error reporting that includes names of source files + try: sources = ent.get('sources', []) patches = ent.get('patches', []) + ent.get('postinstallpatches', []) checksums = ent.get('checksums', []) - else: - raise EasyBuildError(f"Unexpected value type in EasyBlock.check_checksums_for: {type(ent)}") + except EasyBuildError as err: + if isinstance(ent, EasyConfig): + sources = ent.get_ref('sources') + patches = ent.get_ref('patches') + ent.get_ref('postinstallpatches') + checksums = ent.get_ref('checksums') # Single source should be re-wrapped as a list, and checksums with it if isinstance(sources, dict):