From 909213bd23cbe41e1e5db38821cccad684728f9c Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Fri, 30 Aug 2024 16:23:54 +0200 Subject: [PATCH] only call _sanity_check_step_extensions if --skip-extensions is not set Derived easyblocks might want to override this method to add own checks. By moving the check outside the call it doesn't need to be repeated in derived classes. --- easybuild/framework/easyblock.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 22c86038b9..b615df18d4 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -3489,10 +3489,7 @@ def _sanity_check_step_extensions(self): """Sanity check on extensions (if any).""" failed_exts = [] - if build_option('skip_extensions'): - self.log.info("Skipping sanity check for extensions since skip-extensions is enabled...") - return - elif not self.ext_instances: + if not self.ext_instances: # class instances for extensions may not be initialized yet here, # for example when using --module-only or --sanity-check-only self.prepare_for_extensions() @@ -3644,7 +3641,10 @@ def xs2str(xs): # also run sanity check for extensions (unless we are an extension ourselves) if not extension: - self._sanity_check_step_extensions() + if build_option('skip_extensions'): + self.log.info("Skipping sanity check for extensions since skip-extensions is enabled...") + else: + self._sanity_check_step_extensions() linked_shared_lib_fails = self.sanity_check_linked_shared_libs() if linked_shared_lib_fails: