diff options
author | Dylan Garrett <dylan.garrett@gmail.com> | 2021-06-06 15:58:51 -0700 |
---|---|---|
committer | Dylan Garrett <dylan.garrett@gmail.com> | 2021-06-06 15:58:51 -0700 |
commit | 3d850b4d695acb4de3616eca947cfb0b7390154e (patch) | |
tree | f4bee38d206370e169f2aef7f471448e437ecbf7 /lib | |
parent | 0300ecf7be0063a60a5b603c6c5134e0afa00593 (diff) | |
download | roka-3d850b4d695acb4de3616eca947cfb0b7390154e.tar.gz roka-3d850b4d695acb4de3616eca947cfb0b7390154e.zip |
Allow base_url with no app.cfg
Diffstat (limited to 'lib')
-rw-r--r-- | lib/books.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/books.py b/lib/books.py index 84754f6..6f3510b 100644 --- a/lib/books.py +++ b/lib/books.py @@ -15,7 +15,8 @@ JSON_PATH = os.path.join(CACHE_PATH, 'audiobooks.json') # use Flask's config parser, configparser would be hacky APP = Flask(__name__) -APP.config.from_pyfile(os.path.join(ABS_PATH, '../', 'app.cfg')) +if os.path.exists(os.path.join(ABS_PATH, '../', 'app.cfg')): + APP.config.from_pyfile(os.path.join(ABS_PATH, '../', 'app.cfg')) class Books: def __init__(self): |