fix conflicts with Aitor: I win!
This commit is contained in:
commit
4f4fc29312
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
pwdb.json
|
pwdb.json
|
||||||
|
__pycache__
|
4
auth.py
4
auth.py
|
@ -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!')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue