[hplip/f19: 2/2] Another fix for commafy() (bug #984167/bug #1076954 comment #21).
Tim Waugh
twaugh at fedoraproject.org
Wed Jul 9 10:11:07 UTC 2014
commit d54088ddceddf608e88151c1fdc5aba428552f36
Author: Tim Waugh <twaugh at redhat.com>
Date: Wed Jul 9 10:51:09 2014 +0100
Another fix for commafy() (bug #984167/bug #1076954 comment #21).
Resolves: rhbz#984167 rhbz#1076954
hplip-codec.patch | 15 ++++++++++-----
hplip.spec | 5 ++++-
2 files changed, 14 insertions(+), 6 deletions(-)
---
diff --git a/hplip-codec.patch b/hplip-codec.patch
index d01b55d..0c57a96 100644
--- a/hplip-codec.patch
+++ b/hplip-codec.patch
@@ -1,12 +1,17 @@
-diff -up hplip-3.14.4/base/utils.py.codec hplip-3.14.4/base/utils.py
---- hplip-3.14.4/base/utils.py.codec 2014-04-16 11:30:46.409807494 +0100
-+++ hplip-3.14.4/base/utils.py 2014-04-16 11:31:43.947158693 +0100
-@@ -463,7 +463,7 @@ def sort_dict_by_value(d):
+diff -up hplip-3.14.6/base/utils.py.codec hplip-3.14.6/base/utils.py
+--- hplip-3.14.6/base/utils.py.codec 2014-07-09 10:35:11.813576899 +0100
++++ hplip-3.14.6/base/utils.py 2014-07-09 10:43:20.786495160 +0100
+@@ -463,7 +463,12 @@ def sort_dict_by_value(d):
def commafy(val):
- return locale.format("%d", val, grouping=True).decode(locale.getpreferredencoding())
-+ return locale.format("%d", val, grouping=True).decode(locale.getlocale(locale.LC_NUMERIC)[1])
++ format = locale.format("%d", val, grouping=True)
++ encoding = locale.getlocale(locale.LC_NUMERIC)[1]
++ if encoding == None:
++ return format
++
++ return format.decode(encoding)
def format_bytes(s, show_bytes=False):
diff --git a/hplip.spec b/hplip.spec
index db1da53..e2499f7 100644
--- a/hplip.spec
+++ b/hplip.spec
@@ -7,7 +7,7 @@
Summary: HP Linux Imaging and Printing Project
Name: hplip
Version: 3.14.6
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2+ and MIT
Url: http://hplip.sourceforge.net/
@@ -482,6 +482,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
%postun libs -p /sbin/ldconfig
%changelog
+* Wed Jul 9 2014 Tim Waugh <twaugh at redhat.com> - 3.14.6-3
+- Another fix for commafy() (bug #984167/bug #1076954 comment #21).
+
* Tue Jun 17 2014 Jiri Popelka <jpopelka at redhat.com> - 3.14.6-2
- Fix parsing of avahi-daemon output (bug #1096939).
More information about the scm-commits
mailing list