[gnome-continuous] bot: Add missing precision clamp on build times



commit e6be0c6bf8c56d558c3431f3240ec4036002b92c
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Apr 25 15:48:29 2017 +0100

    bot: Add missing precision clamp on build times
    
    I missed a `{:.1f}` format for sub-hour results.

 extras/ircbot/bot.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/extras/ircbot/bot.py b/extras/ircbot/bot.py
index f7f3492..834854e 100644
--- a/extras/ircbot/bot.py
+++ b/extras/ircbot/bot.py
@@ -49,7 +49,7 @@ RED = 4
 
 def human_time(secs):
     if secs < 60:
-        return '{}s'.format(secs)
+        return '{:.1f}s'.format(secs)
     elif secs < 3600:
         return '{}m:{:.1f}s'.format(int(secs / 60), secs % 60)
     else:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]