[yum-cvs] yum output.py,1.59,1.60
Menno Smits
mjs at login.linux.duke.edu
Thu Jun 9 21:44:59 UTC 2005
Update of /home/groups/yum/cvs/yum
In directory login:/tmp/cvs-serv25582
Modified Files:
output.py
Log Message:
Applied Terje's locale workaround.
Index: output.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/output.py,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- output.py 3 Jun 2005 21:21:08 -0000 1.59
+++ output.py 9 Jun 2005 21:44:57 -0000 1.60
@@ -21,7 +21,6 @@
import os.path
import sys
import time
-import locale
from i18n import _
from urlgrabber.progress import TextMeter
@@ -36,12 +35,13 @@
class YumOutput:
def printtime(self):
- locale.setlocale(locale.LC_TIME, 'C')
- ret = time.strftime('%b %d %H:%M:%S ', time.localtime(time.time()))
- locale.resetlocale(locale.LC_TIME)
+ months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
+ now = time.localtime(time.time())
+ ret = months[int(time.strftime('%m', now)) - 1] + \
+ time.strftime(' %d %T ', now)
return ret
-
-
+
def failureReport(self, errobj):
"""failure output for failovers from urlgrabber"""
More information about the Yum-cvs-commits
mailing list