From 762fe68abf22c6849ce8a01214a4e91ca8d4f9fc Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 7 Apr 2020 15:26:43 +0200 Subject: catch potential errors during creation of the first admin user. --- newspipe/commands.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/newspipe/commands.py b/newspipe/commands.py index 3d7becdd..c58c66ae 100755 --- a/newspipe/commands.py +++ b/newspipe/commands.py @@ -45,7 +45,10 @@ def create_admin(nickname, password): "pwdhash": generate_password_hash(password), } with application.app_context(): - UserController(ignore_context=True).create(**admin) + try: + UserController(ignore_context=True).create(**admin) + except Exception as e: + print(e) @application.cli.command("fetch_asyncio") -- cgit