diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
commit | 3cf7c3ef441822c889356fd1812ebf2944a59851 (patch) | |
tree | c513fe68548b40365c1c2ebfe35c58ad431cdd77 /dev-python/urwid/files | |
parent | 05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff) |
gentoo resync : 25.08.2020
Diffstat (limited to 'dev-python/urwid/files')
-rw-r--r-- | dev-python/urwid/files/urwid-2.1.1-ignore-resetting-to-invalid-locale.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/dev-python/urwid/files/urwid-2.1.1-ignore-resetting-to-invalid-locale.patch b/dev-python/urwid/files/urwid-2.1.1-ignore-resetting-to-invalid-locale.patch new file mode 100644 index 000000000000..61549a50d087 --- /dev/null +++ b/dev-python/urwid/files/urwid-2.1.1-ignore-resetting-to-invalid-locale.patch @@ -0,0 +1,32 @@ +From fd010f8336407ad1a42522b424d2ea7b7800ebc4 Mon Sep 17 00:00:00 2001 +From: Jochen Sprickerhof <git@jochen.sprickerhof.de> +Date: Fri, 26 Jun 2020 22:26:23 +0200 +Subject: [PATCH] Ignore resetting to invalid locale (Closes: #377) + +Resetting the locale was introduced in 5dcf236, before that an invalid +locale was ignored. Restore the old behavior insofar that only valid +locales are restored. +This fixes the unit tests of scottkosty/vit with unset LANG. +--- + urwid/util.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/urwid/util.py b/urwid/util.py +index 17c049d..acd62f6 100644 +--- a/urwid/util.py ++++ b/urwid/util.py +@@ -55,7 +55,10 @@ def detect_encoding(): + else: + raise + finally: +- locale.setlocale(locale.LC_ALL, initial) ++ try: ++ locale.setlocale(locale.LC_ALL, initial) ++ except locale.Error: ++ pass + + if 'detected_encoding' not in locals(): + detected_encoding = detect_encoding() +-- +2.26.2 + |