fix conflicts with Aitor: I win!

This commit is contained in:
Tiziano Zito 2024-08-26 12:27:24 +03:00
commit 4f4fc29312
2 changed files with 4 additions and 1 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
pwdb.json pwdb.json
__pycache__

View file

@ -1,6 +1,8 @@
import json import json
import sys import sys
pwdb_path = 'pwdb.json'
def get_credentials(): def get_credentials():
username = input('Enter your username: ') username = input('Enter your username: ')
password = input('Enter your password: ') password = input('Enter your password: ')
@ -30,7 +32,6 @@ if __name__ == "__main__":
pwdb_path = 'pwdb.json' pwdb_path = 'pwdb.json'
pwdb = read_pwdb(pwdb_path) pwdb = read_pwdb(pwdb_path)
if len(sys.argv) > 1: if len(sys.argv) > 1:
pwdb = add_user(sys.argv[1], pwdb) pwdb = add_user(sys.argv[1], pwdb)
write_pwdb(pwdb, pwdb_path) write_pwdb(pwdb, pwdb_path)
@ -43,3 +44,4 @@ if __name__ == "__main__":
print('Successfully authenticated!') print('Successfully authenticated!')
else: else:
print('Wrong password!') print('Wrong password!')