[svn] r6209 - trunk/tools/dstat

packagers at lists.rpmforge.net packagers at lists.rpmforge.net
Wed Mar 12 03:50:04 CET 2008


Author: dag
Date: 2008-03-12 02:50:01 +0000 (Wed, 12 Mar 2008)
New Revision: 6209

Modified:
   trunk/tools/dstat/ChangeLog
   trunk/tools/dstat/dstat
Log:
Difference in integer rounding should not affect colouring

Modified: trunk/tools/dstat/ChangeLog
===================================================================
--- trunk/tools/dstat/ChangeLog	2008-03-11 03:38:36 UTC (rev 6208)
+++ trunk/tools/dstat/ChangeLog	2008-03-12 02:50:01 UTC (rev 6209)
@@ -1,6 +1,7 @@
 * 0.6.7svn - ... - release 09/03/2008
 - Added improved tick patch (Kelly Long)
 - Show milliseconds in dstat_time when using --debug cfr. dstat_epoch
+- Difference in integer rounding should not affect colouring
 
 * 0.6.7 - Cambridge overdue - released 26/02/2008
 - Only rewrite xterm title when XTERM_SHELL is set to bash

Modified: trunk/tools/dstat/dstat
===================================================================
--- trunk/tools/dstat/dstat	2008-03-11 03:38:36 UTC (rev 6208)
+++ trunk/tools/dstat/dstat	2008-03-12 02:50:01 UTC (rev 6209)
@@ -1571,7 +1571,7 @@
     if ret == '0':
         color = 'default'
     elif type in ('d', 'p'):
-        color = colors[int(var/mp)%len(colors)]
+        color = colors[int(round(var)/mp)%len(colors)]
     elif type in ('f'):
         color = colors[c%len(colors)]
     else:




More information about the commits mailing list