Skip to content
Permalink
Browse files

Filename is optional

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Dec 28, 2015
1 parent 5ecacd5 commit f8cccda9efe9d3822d220da7cacfb3f6af6f3f28
Showing with 4 additions and 1 deletion.
  1. +4 −1 nikola/shortcodes.py
@@ -303,5 +303,8 @@ def apply_shortcodes(data, registry, site=None, filename=None):
result.append(res)
return empty_string.join(result)
except ParsingError as e:
LOGGER.error("Shortcode error in file {0}: {1}".format(filename, e))
if filename:
LOGGER.error("Shortcode error in file {0}: {1}".format(filename, e))
else:
LOGGER.error("Shortcode error: {0}".format(e))
sys.exit(1)

0 comments on commit f8cccda

Please sign in to comment.
You can’t perform that action at this time.