@@ -366,7 +366,7 @@ def comment(self, msg):
366366
367367 def check_version (self , minimal_version_maj , minimal_version_min ):
368368 """
369- Check the minimal version of the moduletool in the module file
369+ Check the minimal version of the modules tool in the module file
370370 :param minimal_version_maj: the major version to check
371371 :param minimal_version_min: the minor version to check
372372 """
@@ -1022,8 +1022,8 @@ def check_version(self, minimal_version_maj, minimal_version_min):
10221022 :param minimal_version_maj: the major version to check
10231023 :param minimal_version_min: the minor version to check
10241024 """
1025- LMOD_VERSION_CHECK_EXPR = 'convertToCanonical(LmodVersion()) > convertToCanonical("%(ver_maj)s.%(ver_min)s")'
1026- return LMOD_VERSION_CHECK_EXPR % {
1025+ lmod_version_check_expr = 'convertToCanonical(LmodVersion()) > convertToCanonical("%(ver_maj)s.%(ver_min)s")'
1026+ return lmod_version_check_expr % {
10271027 'ver_maj' : minimal_version_maj ,
10281028 'ver_min' : minimal_version_min ,
10291029 }
@@ -1140,13 +1140,13 @@ def get_description(self, conflict=True):
11401140 for line in self ._generate_whatis_lines ():
11411141 whatis_lines .append ("whatis(%s%s%s)" % (self .START_STR , self .check_str (line ), self .END_STR ))
11421142
1143- provide_list = self ._generate_extensions_list ()
1143+ extensions_list = self ._generate_extensions_list ()
11441144
1145- if provide_list :
1146- provide_list_mod = 'extensions(%s)' % ', ' .join (['"%s"' % x for x in provide_list ])
1147- # put this behind a Lmod version check as extension are only supported since Lmod 8.2.0
1148- # Ref: https://lmod.readthedocs.io/en/latest/330_extensions.html#module-extensions
1149- lines .extend (['' , self .conditional_statement (self .check_version ("8" , "2" ), provide_list_mod )])
1145+ if extensions_list :
1146+ extensions_stmt = 'extensions(%s)' % ', ' .join (['"%s"' % x for x in extensions_list ])
1147+ # put this behind a Lmod version check as 'extensions' is only supported since Lmod 8.2.0,
1148+ # see https://lmod.readthedocs.io/en/latest/330_extensions.html#module-extensions
1149+ lines .extend (['' , self .conditional_statement (self .check_version ("8" , "2" ), extensions_stmt )])
11501150
11511151 txt += '\n ' .join (['' ] + lines + ['' ]) % {
11521152 'name' : self .app .name ,
0 commit comments