Skip to content
This repository was archived by the owner on May 25, 2022. It is now read-only.

Commit 1df204b

Browse files
authored
Update generator.py
1 parent 9b856bf commit 1df204b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

projects/recursive password generator/generator.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,10 @@ def get_random_char():
1313
return randomChar
1414

1515
while 1:
16-
maxlength = int(input(' [?] Enter a length for your password: '))
17-
print("'",stretch('',maxlength),"'\n")
16+
try:
17+
maxlength = int(input(' [?] Enter a length for your password (e for exit): '))
18+
print("'",stretch('',maxlength),"'\n")
19+
except:
20+
if maxlength == 'e':
21+
break
22+
print('Please Enter an integer')

0 commit comments

Comments
 (0)