[yum-commits] repodiff.py
zpavlas at osuosl.org
zpavlas at osuosl.org
Fri Jan 10 09:46:04 UTC 2014
repodiff.py | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
New commits:
commit 6eed41e9e513f74118e082026279eb10944929cb
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date: Fri Jan 10 10:44:10 2014 +0100
repodiff: Use "C" locale for timestamps. BZ 1050885
diff --git a/repodiff.py b/repodiff.py
index 21be5af..5ae1d8f 100755
--- a/repodiff.py
+++ b/repodiff.py
@@ -370,20 +370,5 @@ def main(args):
if __name__ == "__main__":
- # This test needs to be before locale.getpreferredencoding() as that
- # does setlocale(LC_CTYPE, "")
- 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'
- os.environ['LC_ALL'] = 'C'
- locale.setlocale(locale.LC_ALL, 'C')
-
- if True: # not sys.stdout.isatty():
- import codecs
- sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.stdout)
- sys.stdout.errors = 'replace'
-
+ yum.misc.setup_locale(override_time=True)
main(sys.argv[1:])
-
More information about the Yum-commits
mailing list