diff options
author | Jordan <me@jordan.im> | 2020-05-12 14:59:10 -0700 |
---|---|---|
committer | Jordan <me@jordan.im> | 2020-05-12 14:59:10 -0700 |
commit | e1498d4bae4b76265c3c198a543f1086d31833d5 (patch) | |
tree | d7c606ca1fe6061226b5f51c8dea6d03534a9ebb | |
parent | be446548831a21b639577ed7e88fd316a4882d66 (diff) | |
download | roka-e1498d4bae4b76265c3c198a543f1086d31833d5.tar.gz roka-e1498d4bae4b76265c3c198a543f1086d31833d5.zip |
CACHE_PATH -> JSON_PATH, book k/v assignment fix
-rwxr-xr-x | rebuild.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -40,7 +40,7 @@ def get_books(root_path, cache=None): continue book = is_book(book_path) - if book: books[0] = book[1] + if book: books[book[0]] = book[1] return books @@ -173,9 +173,9 @@ if __name__ == '__main__': APP = Flask(__name__) APP.config.from_pyfile(os.path.join(ABS_PATH, 'app.cfg')) - if os.path.exists(CACHE_PATH): + if os.path.exists(JSON_PATH): cache = read_cache(JSON_PATH) - BOOKS = get_books(APP.config['ROOT_PATH'], cache) + BOOKS = get_books(APP.config['ROOT_PATH'], JSON_PATH) else: BOOKS = get_books(APP.config['ROOT_PATH']) |