Module: check_mk
Branch: master
Commit: 6637c72e138930651203327f0429fa90d41d0eed
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6637c72e138930…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Jan 9 17:40:33 2014 +0100
Nicer output for human readable age
---
modules/check_mk_base.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 359fc3a..b1142cf 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -1548,10 +1548,10 @@ def get_age_human_readable(secs):
hours, mins = divmod(mins, 60)
if hours < 12:
return "%d hours, %d min" % (hours, mins)
- if hours < 48:
+ elif hours < 48:
return "%d hours" % hours
days, hours = divmod(hours, 24)
- if days < 7:
+ if days < 7 and hours > 0:
return "%d days, %d hours" % (days, hours)
return "%d days" % days