From b0c1dfb7418999580dd493622b45a5aeda5709fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96hman?= Date: Tue, 17 Oct 2023 19:47:32 +0200 Subject: [PATCH] Switch to python2 and 3 compatible kwarg --- easybuild/easyblocks/generic/bundle.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/easybuild/easyblocks/generic/bundle.py b/easybuild/easyblocks/generic/bundle.py index 8ae2432913..2631f0f62e 100644 --- a/easybuild/easyblocks/generic/bundle.py +++ b/easybuild/easyblocks/generic/bundle.py @@ -66,11 +66,6 @@ def extra_options(extra_vars=None): return EasyBlock.extra_options(extra_vars) def __init__(self, *args, **kwargs): - """ - Constructor for Bundle easyblock - """ - # add check_for_sources named argument in a Python 2+3 compatible way - check_for_sources = kwargs.get('check_for_sources', True) """Initialize easyblock.""" super(Bundle, self).__init__(*args, **kwargs) self.altroot = None @@ -82,7 +77,8 @@ def __init__(self, *args, **kwargs): # list of EasyConfig instances of components for which to run sanity checks self.comp_cfgs_sanity_check = [] - # list of sources for bundle itself *must* be empty + check_for_sources = check_for_sources = kwargs.get('check_for_sources', True) + # list of sources for bundle itself *must* be empty (unless overridden by subclass) if check_for_sources: if self.cfg['sources']: raise EasyBuildError("List of sources for bundle itself must be empty, found %s", self.cfg['sources'])