wok-current diff singularity/stuff/percents-0.30b.patch @ rev 10705

libgd: build /usr/bin/gdlib-config
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat May 28 12:40:01 2011 +0200 (2011-05-28)
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	Sat May 28 12:40:01 2011 +0200
     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.