From 1cf9295c787468d9940d1564a067bbd775769e0a Mon Sep 17 00:00:00 2001 From: Alvin Chow Date: Fri, 25 Sep 2015 16:35:16 -0700 Subject: [PATCH] Don't die if some non-MD files are found in the wiki repo during rebuild_index() --- realms/modules/search/commands.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/realms/modules/search/commands.py b/realms/modules/search/commands.py index f17dd02..a35cba3 100644 --- a/realms/modules/search/commands.py +++ b/realms/modules/search/commands.py @@ -25,6 +25,9 @@ def rebuild_index(): wiki = Wiki(app.config['WIKI_PATH']) for entry in wiki.get_index(): page = wiki.get_page(entry['name']) + if not page: + # Some non-markdown files may have issues + continue name = filename_to_cname(page['name']) # TODO add email? body = dict(name=name,