Fix dictionary change during iteration
During dumping the result_dict it we iterate over a copy of it and
filter out some variables. This results in the error below [1]. The
reason is the result_dict.keys() doesn't return a new set of the
existing keys but a view of them which is changed then during
iteration. This can be fixed by creating a list of the keys and
iterating over that.
[1] Log:
[WARNING]: Failure using method (v2_runner_on_ok) in callback plugin
(<ansible.plugins.callback.zuul_stream.CallbackModule object at
0x7f5d41b73b70>): dictionary changed size during iteration
Change-Id: I2ad148002dbe471296b4c1b0e448f2cc03ce2913
1 file changed