From ea34751e08b6da540511f8e7ef1ce6f1e12cdcc9 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Wed, 27 Nov 2024 10:22:00 +0100 Subject: [PATCH] fix: options could be a list --- src/rougail/config.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/rougail/config.py b/src/rougail/config.py index 83905d1c5..adb2510ee 100644 --- a/src/rougail/config.py +++ b/src/rougail/config.py @@ -488,12 +488,17 @@ force_optional: extra_vars |= obj["extra_vars"] if not "options" in obj: continue - convert.parse_root_file( - f'rougail.config.{obj["name"]}', - "", - "1.1", - YAML().load(obj["options"]), - ) + if not isinstance(obj["options"], list): + options = [obj["options"]] + else: + options = obj["options"] + for option in options: + convert.parse_root_file( + f'rougail.config.{obj["name"]}', + "", + "1.1", + YAML().load(option), + ) tiram_obj = convert.save(None) optiondescription = {}