commit 3dc4bfa09136faf6ce72432731824d926c6ddcdc
Author: Ondrej Lichtner <olichtne(a)redhat.com>
Date: Fri Feb 20 16:48:25 2015 +0100
NetTestResultSerializer: fix seconds calculation for time remaining
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(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst/Controller/NetTestResultSerializer.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lnst/Controller/NetTestResultSerializer.py
b/lnst/Controller/NetTestResultSerializer.py
index 62d4e43..515ead7 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*3600 - minutes*60
logging.info("Total test time: %d days, %d hours, %d minutes, "\
"%d seconds" % (days, hours, minutes, seconds))