From e4e9f921b6bae1355461812a2c519fab43b17d3d Mon Sep 17 00:00:00 2001 From: Dennis Boldt Date: Sun, 2 Jan 2022 20:56:51 +0100 Subject: [PATCH] Fix isPath --- api/obs/api/app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/obs/api/app.py b/api/obs/api/app.py index 678f8fb..05f0a39 100644 --- a/api/obs/api/app.py +++ b/api/obs/api/app.py @@ -1,9 +1,10 @@ import logging import re + from json import JSONEncoder, dumps from functools import wraps, partial from urllib.parse import urlparse -from os.path import dirname, join, normpath, abspath +from os.path import dirname, join, normpath, abspath, isfile from datetime import datetime, date from sanic import Sanic, Blueprint @@ -26,7 +27,7 @@ log = logging.getLogger(__name__) app = Sanic("OpenBikeSensor Portal API", load_env="OBS_", log_config={}) -if os.path.isfile("./config.py"): +if isfile("./config.py"): app.update_config("./config.py") c = app.config