[yum-git] repodiff.py
Tim Lauridsen
timlau at linux.duke.edu
Thu May 29 11:07:57 UTC 2008
repodiff.py | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 9f23ddc1681ef1b9cc74a97fa90f5c76f3d3c00f
Author: Tim Lauridsen <tla at rasmil.dk>
Date: Thu May 29 12:57:29 2008 +0200
Make repodiff always run in LANG=C
diff --git a/repodiff.py b/repodiff.py
index 26433fa..e6d3d87 100755
--- a/repodiff.py
+++ b/repodiff.py
@@ -18,6 +18,8 @@ import yum
import rpmUtils
import sys
import time
+import os
+import locale
from optparse import OptionParser
@@ -221,6 +223,9 @@ def main(args):
if __name__ == "__main__":
+ # Always run in LANG=C, because this tool is not localized
+ os.environ['LC_ALL'] = 'C'
+ locale.setlocale(locale.LC_ALL, 'C')
if not sys.stdout.isatty():
import codecs, locale
sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.stdout)
More information about the Yum-cvs-commits
mailing list