From 8d9ed5686467f83ec532a2e4064fa15603a02313 Mon Sep 17 00:00:00 2001 From: janeczku Date: Mon, 6 Feb 2017 15:28:40 +0100 Subject: [PATCH] Fix typo; raise exception when creating database --- cps/ub.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cps/ub.py b/cps/ub.py index 106cacbf..dc86a257 100644 --- a/cps/ub.py +++ b/cps/ub.py @@ -419,7 +419,7 @@ def create_admin_user(): user.nickname = "admin" user.role = ROLE_USER + ROLE_ADMIN + ROLE_DOWNLOAD + ROLE_UPLOAD + ROLE_EDIT + ROLE_PASSWD user.sidebar_view = DETAIL_RANDOM + SIDEBAR_LANGUAGE + SIDEBAR_SERIES + SIDEBAR_CATEGORY + SIDEBAR_HOT + \ - SIDEBAR_RANDOM + SIDEBAR_AUTHOR + SIEDBAR_BEST_RATED + SIDEBAR_RANDOM + SIDEBAR_AUTHOR + SIDEBAR_BEST_RATED user.password = generate_password_hash(DEFAULT_PASS) @@ -444,7 +444,7 @@ if not os.path.exists(dbpath): create_admin_user() create_anonymous_user() except Exception: - pass + raise else: migrate_Database()