[fix] parsing: nested parsing select#3286
Conversation
| class PluginParsing: | ||
| """Provides parsing framework""" | ||
|
|
||
| _selected = False |
There was a problem hiding this comment.
What does this do? Why not just check if selected_parsers is empty, rather than keeping track separately? Otherwise it looks good to me.
There was a problem hiding this comment.
I do this check because to avoid pop a entry on a task that didn't set it! Otherwise a inner task that does not set a config would delete the config from the upper one
There was a problem hiding this comment.
Ahh, understood. I'm not sure making it a class property helps though does it? If another task runs before the exit handler of the current task, this will still be True there, even though that task didn't set it, no?
There was a problem hiding this comment.
Maybe something like task._custom_parser = True, then do getattr(task, '_custom_parser', False) to check.
|
LGTM, thanks! |
Motivation for changes:
When parsing plugin is used nested (from_task for example), or for example in a global template, the selection is cleared in on_task_exit, returning to the internal by default
Detailed changes:
Config usage if relevant (new plugin or updated schema):