18 lines
610 B
Diff
18 lines
610 B
Diff
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())
|
|
+ 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):
|