Skip to content

Commit

Permalink
Switch to python2 and 3 compatible kwarg
Browse files Browse the repository at this point in the history
  • Loading branch information
Micket committed Oct 17, 2023
1 parent b4c0270 commit b0c1dfb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions easybuild/easyblocks/generic/bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'])
Expand Down

0 comments on commit b0c1dfb

Please sign in to comment.