Fall back to C locale if UTF8 version does not exist
This can happen on RHEL 6 or 7. All current Fedora version have it. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
9da70ee7a9
commit
dc69281025
@ -27,7 +27,11 @@ from pungi import get_full_version, util
|
||||
|
||||
|
||||
# force C locales
|
||||
locale.setlocale(locale.LC_ALL, "C.UTF-8")
|
||||
try:
|
||||
locale.setlocale(locale.LC_ALL, "C.UTF-8")
|
||||
except locale.Error:
|
||||
# RHEL < 8 does not have C.UTF-8 locale...
|
||||
locale.setlocale(locale.LC_ALL, "C")
|
||||
|
||||
|
||||
COMPOSE = None
|
||||
|
Loading…
Reference in New Issue
Block a user