Update add_user.py

This commit is contained in:
Saifeddine ALOUI 2024-01-16 15:56:31 +01:00 committed by GitHub
parent d1fcd4e97a
commit d4bfbc841e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ def add_user(users_list=None):
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)
with open(users_list, 'a') as f: with open(users_list, 'a') as f:
f.write(f'{user_name},{key}\n') f.write(f'{user_name}:{key}\n')
print(f'User {user_name} added to the authorized users list') print(f'User {user_name} added to the authorized users list')
def main(): def main():