Skip to content

Commit 1da0e55

Browse files
committed
Remove pr_options variable
Use a tuple in the list generator to avoid accidentally using that variable which now contained ALL options not if any one was set (as before).
1 parent bd99f65 commit 1da0e55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

easybuild/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def process_eb_args(eb_args, eb_go, cfg_settings, modtool, testing, init_session
333333

334334
categorized_paths = categorize_files_by_type(eb_args)
335335

336-
pr_options = [
336+
set_pr_options = [opt for opt in (
337337
'new_branch_github',
338338
'new_pr',
339339
'new_pr_from_branch',
@@ -342,8 +342,8 @@ def process_eb_args(eb_args, eb_go, cfg_settings, modtool, testing, init_session
342342
'sync_pr_with_develop',
343343
'update_branch_github',
344344
'update_pr',
345+
) if getattr(options, opt)
345346
]
346-
set_pr_options = [opt for opt in pr_options if getattr(options, opt)]
347347
any_pr_option_set = len(set_pr_options) > 0
348348
if len(set_pr_options) > 1:
349349
raise EasyBuildError("The following options are set but incompatible: %s.\nRemove at least one!",

0 commit comments

Comments
 (0)