Update add_user.py
This commit is contained in:
parent
2c76aa166f
commit
d1fcd4e97a
|
@ -12,7 +12,7 @@ def add_user(users_list=None):
|
||||||
"""Add a new user to the users list file"""
|
"""Add a new user to the users list file"""
|
||||||
user_name = input('Enter your username: ')
|
user_name = input('Enter your username: ')
|
||||||
key = generate_key()
|
key = generate_key()
|
||||||
print(f'Your key is: {key}')
|
print(f'Your key is: {user_name}:{key}')
|
||||||
if not users_list or not users_list.exists():
|
if not users_list or not users_list.exists():
|
||||||
users_list = Path(users_list) if users_list else Path('authorized_users.txt')
|
users_list = Path(users_list) if users_list else Path('authorized_users.txt')
|
||||||
users_list.touch(exist_ok=True)
|
users_list.touch(exist_ok=True)
|
||||||
|
|
Loading…
Reference in New Issue