diff --git a/imaginaerraum_door_admin/__init__.py b/imaginaerraum_door_admin/__init__.py index 8d0eafa..a88a6ba 100644 --- a/imaginaerraum_door_admin/__init__.py +++ b/imaginaerraum_door_admin/__init__.py @@ -11,7 +11,7 @@ security = Security() db = SQLAlchemy() -# create admin users (only if they don't exists already) +# create admin users (only if they don't exist already) def create_super_admins(app, user_datastore): admin_file = Path(app.config.get('ADMIN_FILE')) @@ -37,8 +37,10 @@ def create_super_admins(app, user_datastore): 'password': pw}) except Exception as e: app.logger.error( - f"Error while parsing line {i} in admin config file. Config file should contain lines of " - f"' \\n'\n Exception: {e}\nAdmin account could not be created." + f"Error while parsing line {i} in admin config file. " + f"Config file should contain lines of " + f" \\n'\n " + f"Exception: {e}\nAdmin account could not be created." ) with app.app_context(): @@ -73,10 +75,11 @@ def create_super_admins(app, user_datastore): def create_app(): app = Flask(__name__) - app.config.from_object('imaginaerraum_door_admin.default_app_config.DefaultConfig') + app.config.from_object( + 'imaginaerraum_door_admin.default_app_config.DefaultConfig' + ) app.config.from_envvar('APPLICATION_SETTINGS', silent=True) - token_file = Path(app.config.get('TOKEN_FILE')) if not token_file.exists(): app.logger.warning(