Skip to content

Commit

Permalink
fix: introduced set() to eliminate duplicate accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
cmeesters committed May 14, 2024
1 parent 0d07263 commit 5a3edf3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion snakemake_executor_plugin_slurm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,10 @@ def test_account(self, account):
f"'{account}' with sacctmgr: {e.stderr}"
)

accounts = [_.strip() for _ in accounts.split("\n") if _]
# The set() has been introduced during review. It eleminates
# duplicates. They are not harmful, but disturbing to read.
# the set eliminates duplicates - not harmful, but disturbing to read
accounts = set(_.strip() for _ in accounts.split("\n") if _)

if account not in accounts:
raise WorkflowError(
Expand Down

0 comments on commit 5a3edf3

Please sign in to comment.