Fri, Mar 20, 2020 at 04:13:40PM CET, olichtne(a)redhat.com wrote:
On Mon, Mar 16, 2020 at 07:03:12PM +0100, Jan Tluka wrote:
> Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
> ---
> lnst/RecipeCommon/Ping.py | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/lnst/RecipeCommon/Ping.py b/lnst/RecipeCommon/Ping.py
> index 62cbc2ff..f6ad47e9 100644
> --- a/lnst/RecipeCommon/Ping.py
> +++ b/lnst/RecipeCommon/Ping.py
> @@ -50,20 +50,20 @@ class PingTestAndEvaluate(BaseRecipe):
> def ping_test(self, ping_config):
> results = {}
>
> - running_ping_array = []
> + ping_array = []
> for pingconf in ping_config:
^^^^^^^^^^
can we also rename this to ping_configs so that we don't have two
variables with the same name differentiated by a '_'? adding '-s' at
least makes it clear that it's plural
Sure. A good idea. I got confused many times by this. Will update the
patches.
> ping, client = self.ping_init(pingconf)
> - running_ping = client.prepare_job(ping)
> - running_ping.start(bg = True)
> - running_ping_array.append((pingconf, running_ping))
> + ping = client.prepare_job(ping)
> + ping.start(bg = True)
> + ping_array.append((pingconf, ping))
>
> - for _, pingjob in running_ping_array:
> + for _, pingjob in ping_array:
> try:
> pingjob.wait()
> finally:
> pingjob.kill()
>
> - for pingconf, pingjob in running_ping_array:
> + for pingconf, pingjob in ping_array:
> result = pingjob.result
> results[pingconf] = result
>
> --
> 2.21.1
> _______________________________________________
> LNST-developers mailing list -- lnst-developers(a)lists.fedorahosted.org
> To unsubscribe send an email to lnst-developers-leave(a)lists.fedorahosted.org
> Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives:
https://lists.fedorahosted.org/archives/list/lnst-developers@lists.fedora...