[yum-cvs] yum yummain.py,1.97,1.97.2.1
Seth Vidal
skvidal at login.linux.duke.edu
Sat Dec 3 08:27:14 UTC 2005
Update of /home/groups/yum/cvs/yum
In directory login:/tmp/cvs-serv23979
Modified Files:
Tag: yum-2_4_X
yummain.py
Log Message:
fix for rh bug: 174669
set locale to C if our locale assertion fails.
Index: yummain.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yummain.py,v
retrieving revision 1.97
retrieving revision 1.97.2.1
diff -u -r1.97 -r1.97.2.1
--- yummain.py 7 Jun 2005 13:46:21 -0000 1.97
+++ yummain.py 3 Dec 2005 08:27:12 -0000 1.97.2.1
@@ -64,8 +64,13 @@
except Errors.LockError, e:
sys.exit(200)
- locale.setlocale(locale.LC_ALL, '')
-
+ try:
+ locale.setlocale(locale.LC_ALL, '')
+ except locale.Error, e:
+ # default to C locale if we get a failure.
+ print >> sys.stderr, 'Failed to set locale, defaulting to C'
+ locale.setlocale(locale.LC_ALL, 'C')
+
# our core object for the cli
base = cli.YumBaseCli()
More information about the Yum-cvs-commits
mailing list