7a76bd0b4c
- Fix unicode handling in ostree tasks - Introduce bach module gather source
31 lines
773 B
Diff
31 lines
773 B
Diff
From dc69281025cbc95ef85f378c839030ca4d8235b4 Mon Sep 17 00:00:00 2001
|
|
From: Lubomír Sedlář <lsedlar@redhat.com>
|
|
Date: May 13 2019 08:25:00 +0000
|
|
Subject: 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>
|
|
|
|
---
|
|
|
|
diff --git a/bin/pungi-koji b/bin/pungi-koji
|
|
index 049eeaa..38e2fcf 100755
|
|
--- a/bin/pungi-koji
|
|
+++ b/bin/pungi-koji
|
|
@@ -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
|
|
|