aboutsummaryrefslogtreecommitdiff
path: root/manager.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2020-03-20 18:12:57 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2020-03-20 18:12:57 +0100
commit966f40d591d6fc95068fc22c5b283b9ab54c3d8e (patch)
tree91d949d700e58bf89917f5e0cbb34ea97e54bea2 /manager.py
parentadded files for docker (diff)
downloadnewspipe-966f40d591d6fc95068fc22c5b283b9ab54c3d8e.tar.gz
newspipe-966f40d591d6fc95068fc22c5b283b9ab54c3d8e.tar.bz2
newspipe-966f40d591d6fc95068fc22c5b283b9ab54c3d8e.zip
Added Dockerfile, images: python3.8-alpine and postgres.
Diffstat (limited to 'manager.py')
-rwxr-xr-xmanager.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/manager.py b/manager.py
index 2ecdeffc..fcb5d0c5 100755
--- a/manager.py
+++ b/manager.py
@@ -39,8 +39,11 @@ def db_create():
"pwdhash": generate_password_hash(os.environ.get("ADMIN_PASSWORD", "password")),
}
with application.app_context():
- db.create_all()
- UserController(ignore_context=True).create(**admin)
+ try:
+ db.create_all()
+ UserController(ignore_context=True).create(**admin)
+ except Exception as e:
+ print(e)
@manager.command
bgstack15