uwefladrich/scriptengine

Wrong loop variable collision warnings

Closed this issue · 0 comments

Running the following script:

- base.task_timer:
    mode: instances
- do:
    - when: "True"
      base.echo:
        msg: Hi!
  loop: [1, 2, 3]

results in:

[...] INFO [se.cli] Logging configured and started
[...] INFO [se.task:task_timer <847a891888>] Task timing activated in mode "instances" and logging to "False"
[...] INFO [se.task:echo <a425f68f56>] Hi!
Hi!
[...] WARNING [se.job <f479a98da1>] The following loop variables collide with the context: {'item'}
[...] INFO [se.task:echo <a425f68f56>] Hi!
Hi!
[...] WARNING [se.job <f479a98da1>] The following loop variables collide with the context: {'item'}
[...] INFO [se.task:echo <a425f68f56>] Hi!
Hi!

where the warnings are strange, because there is no loop variable collision.
Removing either the task_timer task or the when clause of the echo task avoids the warnings. Note that there are (only) two warnings, no warning is written in the first loop iteration!