Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed duplicate conditional statement in force_rotation_handler.py #31

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Jarvis-BITS
Copy link

Issue #29

Description of changes:

Fixed duplicate conditional statement at lines 30 & 35 in force_rotation_handler.py within access_key_auto_rotation.zip

old code:

      log.info(f'ForceRotate flag exists for [{force_rotate_user_name}].')
  elif "ForceRotate" not in event and not noUsers:
      force_rotate = False
      log.info(
          'ForceRotate flag does not exist and '
          'there are users in this account.')
  elif "ForceRotate" not in event and not noUsers:
      log.info(
          f'ForceRotate flag exists for [{force_rotate_user_name}]'
          f' but there are no users in this account.')

Both elif statements have the same conditional statement elif "ForceRotate" not in event and not noUsers:. The second elif statement (line 35) was changed to elif "ForceRotate" in event and noUsers:

updated code:

      log.info(f'ForceRotate flag exists for [{force_rotate_user_name}].')
  elif "ForceRotate" not in event and not noUsers:
      force_rotate = False
      log.info(
          'ForceRotate flag does not exist and '
          'there are users in this account.')
  elif "ForceRotate" in event and noUsers:
      log.info(

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant