[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lnst-developers
Subject:    Re: [PATCH 1/6] NetTestResultSerializer: fix seconds calculation for time remaining
From:       Ondrej Lichtner <olichtne () redhat ! com>
Date:       2015-02-20 15:51:22
Message-ID: 20150220155122.GA3532 () dhcp-27-236 ! brq ! redhat ! com
[Download RAW message or body]

jprochaz reported that it should be hours*3600
I also changed one of the commit headers related to regression-tests so
that it fits with the others
ignore this patchset, sending v2

On Fri, Feb 20, 2015 at 04:21:11PM +0100, olichtne@redhat.com wrote:
> From: Ondrej Lichtner <olichtne@redhat.com>
> 
> When calculating the remaining seconds of the total test time I didn't
> subtract seconds for the hours. This commit fixes that.
> 
> Signed-off-by: Ondrej Lichtner <olichtne@redhat.com>
> ---
>  lnst/Controller/NetTestResultSerializer.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lnst/Controller/NetTestResultSerializer.py b/lnst/Controller/NetTestResultSerializer.py
> index 62d4e43..4ac45dc 100644
> --- a/lnst/Controller/NetTestResultSerializer.py
> +++ b/lnst/Controller/NetTestResultSerializer.py
> @@ -129,7 +129,7 @@ class NetTestResultSerializer:
>          days = dif_time.days
>          hours = dif_time.seconds/3600
>          minutes = dif_time.seconds/60 - hours*60
> -        seconds = dif_time.seconds - minutes*60
> +        seconds = dif_time.seconds - hours*60 - minutes*60
>          logging.info("Total test time: %d days, %d hours, %d minutes, "\
>                       "%d seconds" % (days, hours, minutes, seconds))
>  
> -- 
> 2.1.0
> 
_______________________________________________
LNST-developers mailing list
LNST-developers@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/lnst-developers

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic