Permalink
Browse files

Difference in integer rounding should not affect colouring

  • Loading branch information...
1 parent ce014a9 commit 5c811f8b7d37ea57d4a1506d4ff634fb56e30a78 @dagwieers committed Mar 12, 2008
Showing with 2 additions and 1 deletion.
  1. +1 −0 ChangeLog
  2. +1 −1 dstat
View
@@ -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
View
2 dstat
@@ -1571,7 +1571,7 @@ def cprint(var, format = ('f', 4, 1000)):
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:

0 comments on commit 5c811f8

Please sign in to comment.