wok-next diff singularity/stuff/percents-0.30b.patch @ rev 8325
tazdev: typo
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Tue Feb 01 22:28:34 2011 +0100 (2011-02-01) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/singularity/stuff/percents-0.30b.patch Tue Feb 01 22:28:34 2011 +0100 1.3 @@ -0,0 +1,14 @@ 1.4 +--- singularity-0.30b/code/g.py 1.5 ++++ singularity-0.30b/code/g.py 1.6 +@@ -265,9 +265,9 @@ 1.7 + def to_percent(raw_percent, show_full = False): 1.8 + locale_name, encoding = locale.getlocale() 1.9 + if raw_percent % 100 != 0 or show_full: 1.10 +- return locale.format("%.2f%%", raw_percent / 100.).decode(encoding) 1.11 ++ return locale.format("%.2f", raw_percent / 100.).decode(encoding) 1.12 + else: 1.13 +- return locale.format("%d%%", raw_percent // 100).decode(encoding) 1.14 ++ return locale.format("%d", raw_percent // 100).decode(encoding) 1.15 + 1.16 + # nearest_percent takes values in the internal representation and modifies 1.17 + # them so that they only represent the nearest percentage.