Skip to content

Commit

Permalink
fix: applied black code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
abastola0 committed Nov 19, 2023
1 parent 067fda9 commit e277eb3
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions keyring/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,24 @@ def do_set(self):
trials = 3
for i in range(trials):
password = self.input_password(
f"Password for '{self.username}' in '{self.service}': ")

f"password for '{self.username}' in '{self.service}': "
)

reentered_password = self.input_password(
f"Re-enter password for '{self.username}' in '{self.service}': ")

f"re-enter password for '{self.username}' in '{self.service}': "
)

if password == reentered_password:
# If passwords match, set the password and break the loop
# if passwords match, set the password and break the loop
set_password(self.service, self.username, password)
break
else:
print('Password verification failed! Try again!\n')

else: # This else is associated with the for-loop, not the if-statement
sys.stderr.write(f"Password verification failed for {trials} times. Aborting!!\n")
print('password verification failed! try again!\n')

else: # this else is associated with the for-loop, not the if-statement
sys.stderr.write(
f"password verification failed for {trials} times. aborting!!\n"
)
sys.exit(1)

def do_del(self):
Expand Down

0 comments on commit e277eb3

Please sign in to comment.