diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2015-05-29 15:15:10 +0200 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2015-05-29 20:01:23 +0200 |
commit | 5670d59d0601c21b905125d2be18f1b0917cfce5 (patch) | |
tree | 9c74a9a9ce619e359cf4b2410926a7a62ff79361 /filter.py | |
parent | 391aa665a77420fcbbb54e8ed879fec5a4f9e495 (diff) | |
download | clufter-5670d59d0601c21b905125d2be18f1b0917cfce5.tar.gz clufter-5670d59d0601c21b905125d2be18f1b0917cfce5.tar.xz clufter-5670d59d0601c21b905125d2be18f1b0917cfce5.zip |
filter: XSLT: clufter:descent-mix vs. repeated references
...for the same tag
from previous commit:
> ... should be only for clufter:descent-mix (seems really a bad idea
> for clufter:descent)
-> turn the exception just into info log message for clufter:descent-mix
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'filter.py')
-rw-r--r-- | filter.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -589,10 +589,11 @@ class XMLFilter(Filter, MetaPlugin): at_hooks = hooks.setdefault(at, []) at_hooks.append((walk, mix)) if len(at_hooks) > 1: - raise FilterError(None, - "Ambigous match for `{0}' tag ({1} vs {2})" - .format(at, walk, at_hooks[0]) - ) + msg = ("Ambigous match for `{0}' tag ({1} vs {2})" + .format(at, walk, at_hooks[0])) + if not mix: + raise FilterError(None, msg) + log.info(msg) elif (elem.tag == namespaced(XSL_NS, 'comment') and parent and not(parent[2])): # in non-root, turn the comments into "protected" ones |