skip empty lines in admins file

This commit is contained in:
Simon Pirkelmann 2022-12-28 17:10:06 +01:00
parent 7ec0ba251d
commit 786df6b552

View File

@ -28,7 +28,7 @@ def create_super_admins(app, user_datastore):
# afterwards
admin_data = admin_file.read_text().split('\n')
for i, line in enumerate(admin_data):
if not line.strip().startswith('#'):
if len(line.strip()) > 0 and not line.strip().startswith('#'):
try:
user, email, pw = line.split()
validate_email(email)