From debb1a631defdc3651b37576d1d6fb6f3c8fc0f7 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Tue, 16 Jan 2024 09:46:10 +0100 Subject: [PATCH] Update add_user.py --- ollama_proxy_server/add_user.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ollama_proxy_server/add_user.py b/ollama_proxy_server/add_user.py index 5dcb6bc..5c0d59e 100644 --- a/ollama_proxy_server/add_user.py +++ b/ollama_proxy_server/add_user.py @@ -20,8 +20,11 @@ def add_user(users_list=None): f.write(f'{user_name}: {key}\n') print(f'User {user_name} added to the authorized users list') -if __name__ == '__main__': +def main(): if len(sys.argv) > 1 and sys.argv[1] == '--users_list': add_user(Path(sys.argv[2])) else: add_user() + +if __name__ == '__main__': + main()