|
85 | 85 | from easybuild.tools.build_log import EasyBuildError, EasyBuildExit, dry_run_msg, dry_run_warning, dry_run_set_dirs |
86 | 86 | from easybuild.tools.build_log import print_error_and_exit, print_msg, print_warning |
87 | 87 | from easybuild.tools.config import CHECKSUM_PRIORITY_JSON, DEFAULT_ENVVAR_USERS_MODULES |
88 | | -from easybuild.tools.config import EASYBUILD_SOURCES_URL, EBPYTHONPREFIXES # noqa |
| 88 | +from easybuild.tools.config import EASYBUILD_SOURCES_URL, EBPYTHONPREFIXES # noqa # pylint:disable=unused-import |
89 | 89 | from easybuild.tools.config import FORCE_DOWNLOAD_ALL, FORCE_DOWNLOAD_PATCHES, FORCE_DOWNLOAD_SOURCES |
90 | 90 | from easybuild.tools.config import MOD_SEARCH_PATH_HEADERS, PYTHONPATH, SEARCH_PATH_BIN_DIRS, SEARCH_PATH_LIB_DIRS |
91 | 91 | from easybuild.tools.config import build_option, build_path, get_failed_install_build_dirs_path |
@@ -4365,15 +4365,17 @@ def sanity_check_load_module(self, extension=None, extra_modules=None): |
4365 | 4365 | f'Should be: {self.is_extension}, got: {extension}') |
4366 | 4366 | del extension # Avoid accidental use |
4367 | 4367 |
|
| 4368 | + if self.is_extension: |
| 4369 | + return self.fake_mod_data |
| 4370 | + |
4368 | 4371 | # skip loading of fake module when using --sanity-check-only, load real module instead |
4369 | | - if build_option('sanity_check_only') and not extension: |
| 4372 | + if build_option('sanity_check_only'): |
4370 | 4373 | self.log.info("Loading real module for %s %s: %s", self.name, self.version, self.short_mod_name) |
4371 | 4374 | self.load_module(extra_modules=extra_modules) |
4372 | 4375 | self.sanity_check_module_loaded = True |
4373 | 4376 |
|
4374 | 4377 | # only load fake module for non-extensions, and not during dry run |
4375 | | - elif not (extension or self.dry_run): |
4376 | | - |
| 4378 | + elif not self.dry_run: |
4377 | 4379 | if extra_modules: |
4378 | 4380 | self.log.info("Loading extra modules for sanity check: %s", ', '.join(extra_modules)) |
4379 | 4381 |
|
|
0 commit comments