From a3ec86790fc06308f1bc93051c01b09d37853c0d Mon Sep 17 00:00:00 2001 From: Julian Rother <julianr@fsmpi.rwth-aachen.de> Date: Tue, 15 Jun 2021 15:10:17 +0200 Subject: [PATCH] Simplified instance folder creation --- uffd/__init__.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/uffd/__init__.py b/uffd/__init__.py index 05ace003..3a7472c2 100644 --- a/uffd/__init__.py +++ b/uffd/__init__.py @@ -61,11 +61,7 @@ def create_app(test_config=None): # pylint: disable=too-many-locals register_template_helper(app) setup_navbar(app) - # ensure the instance folder exists - try: - os.makedirs(app.instance_path) - except OSError: - pass + os.makedirs(app.instance_path, exist_ok=True) db.init_app(app) Migrate(app, db, render_as_batch=True) -- GitLab