aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2012-02-13 19:49:53 +0100
committerMatěj Cepl <mcepl@redhat.com>2012-02-13 19:50:13 +0100
commitf1a273134481b2230d83144cffd26046c031130e (patch)
treedf7b33218f7c887199189eb1bcbb2a0c65ae7ce2
parent874630611034b4cd5f40364c02910c4c4055391b (diff)
downloadjson_diff-f1a273134481b2230d83144cffd26046c031130e.tar.gz
Just get rid off locale.getpreferredencoding.1.2.8
It doesn't do us any good and people should use UTF-8 anyway. Signed-off-by: Matěj Cepl <mcepl@redhat.com>
-rwxr-xr-xjson_diff.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/json_diff.py b/json_diff.py
index b77cf3c..0866eba 100755
--- a/json_diff.py
+++ b/json_diff.py
@@ -32,9 +32,7 @@ import logging
from optparse import OptionParser
__author__ = "Matěj Cepl"
-__version__ = "1.2.7"
-
-import locale
+__version__ = "1.2.8"
logging.basicConfig(format='%(levelname)s:%(funcName)s:%(message)s',
level=logging.INFO)
@@ -358,7 +356,7 @@ def main(sys_args):
print(unicode(HTMLFormatter(diff_res)).encode("utf-8"))
else:
outs = json.dumps(diff_res, indent=4, ensure_ascii=False)
- print(outs.encode(locale.getpreferredencoding(do_setlocale=False)))
+ print(outs.encode("utf-8"))
if len(diff_res) > 0:
return 1