add warning for unknown replacement indicators

If an unknown replacement indicator {bla} was used, it was ignored
silently. This commit adds a warning when an unmatched indicator occurs
to help identify the issue.

closes #1794
This commit is contained in:
winlu 2015-08-08 14:38:25 +02:00
commit 657ffdd75f
2 changed files with 26 additions and 3 deletions

View file

@ -248,6 +248,11 @@ class Content(object):
origin = '/'.join((siteurl, Category(path, self.settings).url))
elif what == 'tag':
origin = '/'.join((siteurl, Tag(path, self.settings).url))
else:
logger.warning(
"Replacement Indicator '%s' not recognized, "
"skipping replacement",
what)
# keep all other parts, such as query, fragment, etc.
parts = list(value)