From 50642ccde906be2c936f7ab4e6ef6c6d78b06aad Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Wed, 13 Jan 2016 09:48:12 +0100 Subject: [PATCH] minor refoactoring --- patacrep/content/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/patacrep/content/__init__.py b/patacrep/content/__init__.py index 26e67080..6f5eed4b 100755 --- a/patacrep/content/__init__.py +++ b/patacrep/content/__init__.py @@ -268,10 +268,9 @@ def process_content(content, config=None): elem = {'song': elem} if isinstance(elem, dict): for keyword, argument in elem.items(): - if keyword not in plugins: - contentlist.append_error(ContentError(keyword, "Unknown content keyword.")) - continue try: + if keyword not in plugins: + raise ContentError(keyword, "Unknown content keyword.") contentlist.extend(plugins[keyword]( keyword, argument=argument,