From cd8a32f544d33daf829ff48e858b0dcd1fed30b1 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Tue, 25 Aug 2020 09:36:59 -0300 Subject: [PATCH] Added comment pre-parsing. Just to make the debug logs about which targets are skipped more descriptive. --- kibot/config_reader.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kibot/config_reader.py b/kibot/config_reader.py index 3ec0e5de..c9aef6ca 100644 --- a/kibot/config_reader.py +++ b/kibot/config_reader.py @@ -59,18 +59,24 @@ class CfgYamlReader(object): except KeyError: config_error("Output `"+name+"` needs a type") + try: + comment = o_tree['comment'] + except KeyError: + comment = '' + name_type = "`"+name+"` ("+otype+")" # Is a valid type? if not RegOutput.is_registered(otype): config_error("Unknown output type: `{}`".format(otype)) # Load it - logger.debug("Parsing output options for "+name_type) + logger.debug("Pre-parsing output options for "+name_type) o_out = RegOutput.get_class_for(otype)() o_out.set_tree(o_tree) # Set the data we already know, so we can skip the configurations that aren't requested o_out.name = name o_out.type = otype + o_out.comment = comment return o_out