Skip to content

Commit a299a86

Browse files
committed
fixing minor bug with clipboard copy
1 parent ad4b4be commit a299a86

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

modules/TerraformController.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,13 @@ def list_machines(self):
367367

368368
else:
369369
print("ERROR: Can't find configured Attack Range Instances")
370-
pyperclip.copy(self.config['attack_range_password'])
371-
print("* attack_range password has been copied to your clipboard")
370+
371+
# copy password into clipboard
372+
try:
373+
pyperclip.copy(self.config['attack_range_password'])
374+
print("* attack_range password has been copied to your clipboard")
375+
except Exception as e:
376+
self.log.error("not able to copy password to clipboard")
372377
print()
373378

374379

0 commit comments

Comments
 (0)