limit to only file exists err

This commit is contained in:
samerbam 2023-08-24 23:29:19 -04:00
parent eb7d00c72f
commit 58d9a4229e

View File

@ -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")