limit to only file exists err
This commit is contained in:
parent
eb7d00c72f
commit
58d9a4229e
@ -72,11 +72,13 @@ 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)
|
||||
if e.errno == errno.EEXIST:
|
||||
return {"status": "Not First Run"}
|
||||
|
||||
|
||||
|
||||
@app.get("/api/todos/get")
|
||||
def get_todos(date: str = datetime.today().strftime('%Y-%m-%d'), auth_result: str = Security(auth.verify)):
|
||||
"""A valid access token is required to access this route"""
|
||||
|
Loading…
Reference in New Issue
Block a user