wok annotate singularity/stuff/percents-0.30b.patch @ rev 8904
Fix an error which prevented libwebkit to be signaled as broken
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Mon Feb 28 00:19:13 2011 +0100 (2011-02-28) |
parents | |
children |
rev | line source |
---|---|
gokhlayeh@6960 | 1 --- singularity-0.30b/code/g.py |
gokhlayeh@6960 | 2 +++ singularity-0.30b/code/g.py |
gokhlayeh@6960 | 3 @@ -265,9 +265,9 @@ |
gokhlayeh@6960 | 4 def to_percent(raw_percent, show_full = False): |
gokhlayeh@6960 | 5 locale_name, encoding = locale.getlocale() |
gokhlayeh@6960 | 6 if raw_percent % 100 != 0 or show_full: |
gokhlayeh@6960 | 7 - return locale.format("%.2f%%", raw_percent / 100.).decode(encoding) |
gokhlayeh@6960 | 8 + return locale.format("%.2f", raw_percent / 100.).decode(encoding) |
gokhlayeh@6960 | 9 else: |
gokhlayeh@6960 | 10 - return locale.format("%d%%", raw_percent // 100).decode(encoding) |
gokhlayeh@6960 | 11 + return locale.format("%d", raw_percent // 100).decode(encoding) |
gokhlayeh@6960 | 12 |
gokhlayeh@6960 | 13 # nearest_percent takes values in the internal representation and modifies |
gokhlayeh@6960 | 14 # them so that they only represent the nearest percentage. |