limit to only file exists err

main
samerbam 1 year ago
parent eb7d00c72f
commit 58d9a4229e

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

Loading…
Cancel
Save