diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-04-07 15:26:43 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-04-07 15:26:43 +0200 |
commit | 762fe68abf22c6849ce8a01214a4e91ca8d4f9fc (patch) | |
tree | 63e7f017f32a7c00a6af5c8e1d88b0f569a1ce41 | |
parent | Initialization of Flask-Migrate. (diff) | |
download | newspipe-762fe68abf22c6849ce8a01214a4e91ca8d4f9fc.tar.gz newspipe-762fe68abf22c6849ce8a01214a4e91ca8d4f9fc.tar.bz2 newspipe-762fe68abf22c6849ce8a01214a4e91ca8d4f9fc.zip |
catch potential errors during creation of the first admin user.
-rwxr-xr-x | newspipe/commands.py | 5 |
1 files changed, 4 insertions, 1 deletions
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") |