Skip to content

Commit

Permalink
don't crash if there is no shortcodes/
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Dec 23, 2015
1 parent fee8046 commit 0bc826b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nikola/nikola.py
Expand Up @@ -1295,6 +1295,8 @@ def url_replacer(self, src, dst, lang=None, url_type=None):

def _register_templated_shortcodes(self):
"""Register shortcodes provided by templates in shortcodes/ folder."""
if not os.path.isdir('shortcodes'):
return
for fname in os.listdir('shortcodes'):
name, ext = os.path.splitext(fname)
if ext == '.tmpl':
Expand Down

0 comments on commit 0bc826b

Please sign in to comment.