Skip to content

Commit f0aac44

Browse files
committedDec 24, 2015
handle missing folders better
1 parent ce07d6b commit f0aac44

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎nikola/nikola.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1297,11 +1297,11 @@ def _register_templated_shortcodes(self):
12971297
"""Register shortcodes provided by templates in shortcodes/ folders."""
12981298

12991299
builtin_sc_dir = resource_filename('nikola', os.path.join('data', 'shortcodes', utils.get_template_engine(self.THEMES)))
1300-
sc_dirs = [builtin_sc_dir]
1301-
if os.path.isdir('shortcodes'):
1302-
sc_dirs.append('shortcodes')
1300+
sc_dirs = [builtin_sc_dir, 'shortcodes']
13031301

13041302
for sc_dir in sc_dirs:
1303+
if not os.path.isdir(sc_dir):
1304+
continue
13051305
for fname in os.listdir(sc_dir):
13061306
name, ext = os.path.splitext(fname)
13071307
if ext == '.tmpl':

0 commit comments

Comments
 (0)
Please sign in to comment.