From d7e0c6629739fd4be6413f3029d557a119d0acf0 Mon Sep 17 00:00:00 2001 From: aviau Date: Tue, 26 Jan 2016 09:34:25 -0500 Subject: [PATCH] Fixed locale detection error --- debian/changelog | 6 ++++++ debian/patches/fix-locale-check.patch | 22 ++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 29 insertions(+) create mode 100644 debian/patches/fix-locale-check.patch create mode 100644 debian/patches/series diff --git a/debian/changelog b/debian/changelog index e834469..848dc87 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +python-click (6.2-2) unstable; urgency=medium + + * Fixed locale detection error (Closes: #812713) + + -- Alexandre Viau Tue, 26 Jan 2016 09:33:30 -0500 + python-click (6.2-1) unstable; urgency=medium * New upstream release diff --git a/debian/patches/fix-locale-check.patch b/debian/patches/fix-locale-check.patch new file mode 100644 index 0000000..b6dda95 --- /dev/null +++ b/debian/patches/fix-locale-check.patch @@ -0,0 +1,22 @@ +Description: fixed locale detection error +Origin: vendor +Bug: 812713 +Author: Alexandre Viau +Reviewed-by: Alexandre Viau +Last-Update: 2016-01-26 +Applied-Upstream: https://github.com/mitsuhiko/click/commit/6bc3bf977a16d948841de17a6993ee11587b75b1 + +--- a/click/_unicodefun.py ++++ b/click/_unicodefun.py +@@ -64,6 +64,11 @@ + stderr=subprocess.PIPE).communicate()[0] + good_locales = set() + has_c_utf8 = False ++ ++ # Make sure we're operating on text here. ++ if isinstance(rv, bytes): ++ rv = rv.decode('ascii', 'replace') ++ + for line in rv.splitlines(): + locale = line.strip() + if locale.lower().endswith(('.utf-8', '.utf8')): diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..2f5f815 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +fix-locale-check.patch