diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index 2011a03d30..1c0deb34ba 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -1493,14 +1493,14 @@ def make_module_footer(self): footer.append(self.make_module_extra_extensions()) # include modules footer if one is specified - if self.modules_footer is not None: + if self.modules_footer: self.log.debug("Including specified footer into module: '%s'" % self.modules_footer) footer.append(self.modules_footer) if self.cfg['modtclfooter']: if isinstance(self.module_generator, ModuleGeneratorTcl): self.log.debug("Including Tcl footer in module: %s", self.cfg['modtclfooter']) - footer.extend([self.cfg['modtclfooter'], '\n']) + footer.append(self.cfg['modtclfooter']) else: self.log.warning("Not including footer in Tcl syntax in non-Tcl module file: %s", self.cfg['modtclfooter']) @@ -1508,13 +1508,13 @@ def make_module_footer(self): if self.cfg['modluafooter']: if isinstance(self.module_generator, ModuleGeneratorLua): self.log.debug("Including Lua footer in module: %s", self.cfg['modluafooter']) - footer.extend([self.cfg['modluafooter'], '\n']) + footer.append(self.cfg['modluafooter']) else: self.log.warning("Not including footer in Lua syntax in non-Lua module file: %s", self.cfg['modluafooter']) footer.append(self.module_generator.comment("Built with EasyBuild version %s" % VERBOSE_VERSION)) - return ''.join(footer) + return '\n'.join(footer) def make_module_extend_modpath(self): """