Skip to content

Commit

Permalink
Filename is optional
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Dec 28, 2015
1 parent 5ecacd5 commit f8cccda
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nikola/shortcodes.py
Expand Up @@ -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.