Make the setup process more robust against aborted executions. Fixes #3830

This commit is contained in:
Aditya Toshniwal
2018-12-21 10:30:49 +00:00
committed by Dave Page
parent f62d35bf3c
commit 943fc25f60
5 changed files with 17 additions and 8 deletions

View File

@@ -40,6 +40,8 @@ def upgrade():
if get_version() != -1:
return
email, password = user_info()
op.create_table('version',
sa.Column('name', sa.String(length=32), nullable=False),
sa.Column('value', sa.Integer(), nullable=False),
@@ -109,7 +111,6 @@ INSERT INTO "servergroup"
VALUES(1, 1, 'Servers')
""")
email, password = user_info()
current_salt = getattr(
config, 'SECURITY_PASSWORD_SALT', base64.urlsafe_b64encode(
os.urandom(32)