From 011bd60e8a80c22e8302b2c1f501ec7a152386ca Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Thu, 21 Jan 2016 11:47:53 +0100 Subject: [PATCH] Allow dict as argument --- patacrep/content/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/patacrep/content/__init__.py b/patacrep/content/__init__.py index 1a1f6261..ac7e962e 100755 --- a/patacrep/content/__init__.py +++ b/patacrep/content/__init__.py @@ -263,6 +263,8 @@ def process_content(content, config=None): plugins = config.get('_content_plugins', {}) if not content: content = [{'song': None}] + elif isinstance(content, dict): + content = [content] for elem in content: if isinstance(elem, str): elem = {'song': elem}