Skip to content

Commit

Permalink
fixing minor bug with clipboard copy
Browse files Browse the repository at this point in the history
  • Loading branch information
josehelps committed Aug 26, 2021
1 parent ad4b4be commit a299a86
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions modules/TerraformController.py
Expand Up @@ -367,8 +367,13 @@ def list_machines(self):

else:
print("ERROR: Can't find configured Attack Range Instances")
pyperclip.copy(self.config['attack_range_password'])
print("* attack_range password has been copied to your clipboard")

# copy password into clipboard
try:
pyperclip.copy(self.config['attack_range_password'])
print("* attack_range password has been copied to your clipboard")
except Exception as e:
self.log.error("not able to copy password to clipboard")
print()


Expand Down

0 comments on commit a299a86

Please sign in to comment.