From b4c02702fb8a273bb970abfebe7573f569db96b3 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 5 Sep 2023 19:49:02 +0200 Subject: [PATCH] add custom named argument 'check_for_sources' for Bundle constructor in Python 2+3 compatible way --- easybuild/easyblocks/generic/bundle.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/easybuild/easyblocks/generic/bundle.py b/easybuild/easyblocks/generic/bundle.py index a1b8593c7e..8ae2432913 100644 --- a/easybuild/easyblocks/generic/bundle.py +++ b/easybuild/easyblocks/generic/bundle.py @@ -65,7 +65,12 @@ def extra_options(extra_vars=None): }) return EasyBlock.extra_options(extra_vars) - def __init__(self, check_for_sources=True, *args, **kwargs): + 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