Skip to content

Commit

Permalink
Can't compare itertools.chain and set.
Browse files Browse the repository at this point in the history
  • Loading branch information
amanning9 committed Sep 11, 2024
1 parent 95b2420 commit b6faeb8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jasmin_slurm_sync/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ def expected_slurm_accounts(self) -> set[str]:
for x in self.ldap_user["description"]
if x in known_tags
)
expected_slurm_accounts = set(expected_tags)
# Check that the user is in the required SLURM accounts for sync.
# Otherwise, if they don't have the required accounts, we expect them
# to be in NO accounts.
if expected_tags >= self.settings.required_slurm_accounts:
return set(expected_tags)
if expected_slurm_accounts >= self.settings.required_slurm_accounts:
return expected_slurm_accounts
logger.warning(
"User is not in required accounts: %s so will be removed from ALL acounts that the script manages.",
self.settings.required_slurm_accounts - self.expected_slurm_accounts,
Expand Down

0 comments on commit b6faeb8

Please sign in to comment.