diff --git a/application/main.py b/application/main.py index 55a21e4..29848e2 100644 --- a/application/main.py +++ b/application/main.py @@ -72,9 +72,11 @@ def first_run(): with open('.firsttimeruncheck', 'x') as f: f.write("") return {"status": "First Run"} - except Exception as e: + except OSError as e: print(e) - return {"status": "Not First Run"} + if e.errno == errno.EEXIST: + return {"status": "Not First Run"} + @app.get("/api/todos/get")