diff --git a/eessi/testsuite/utils.py b/eessi/testsuite/utils.py index 5fde4b4b..c68a7ec8 100644 --- a/eessi/testsuite/utils.py +++ b/eessi/testsuite/utils.py @@ -117,9 +117,9 @@ def find_modules(regex: str, name_only=True) -> Iterator[str]: seen.add(orig_mod) yield orig_mod - if dupes != []: - err_msg = "EESSI test-suite cannot handle duplicate modules." - err_msg += "Please make sure that only one is available on your system." + if dupes: + err_msg = "EESSI test-suite cannot handle duplicate modules. " + err_msg += "Please make sure that only one is available on your system. " err_msg += f"The following modules have a duplicate on your system: {dupes}" raise ValueError(err_msg)