[master/f21-branch][PATCH] Make Python's default encoding detection work on Live installations (#1169019)
Vratislav Podzimek
vpodzime at redhat.com
Mon Dec 1 12:46:21 UTC 2014
If LC_ALL is not defined, Python's detection of default encoding gives us
'ascii' as the default codec on Live installations. Setting LC_ALL to $LANG
makes it work better and give us 'utf-8'.
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
data/liveinst/liveinst | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/data/liveinst/liveinst b/data/liveinst/liveinst
index 9d47a19..0a68596 100755
--- a/data/liveinst/liveinst
+++ b/data/liveinst/liveinst
@@ -173,6 +173,12 @@ if [ ! -z "$UPDATES" ]; then
export PATH=/tmp/updates:$PATH
fi
+if [ -z $LC_ALL ]; then
+ # LC_ALL not set, set it to $LANG to make Python's default encoding
+ # detection work
+ export LC_ALL=$LANG
+fi
+
if [ -x /usr/bin/udisks ]; then
/usr/bin/udisks --inhibit -- $ANACONDA $*
else
--
1.9.3
More information about the anaconda-patches
mailing list