seth vidal wrote:
On Thu, 2008-05-29 at 08:34 -0400, Jeremy Katz wrote:
Tim Lauridsen wrote:
New commits:
commit 9f23ddc1681ef1b9cc74a97fa90f5c76f3d3c00f
Author: Tim Lauridsen <[EMAIL PROTECTED]>
Date: Thu May 29 12:57:29 2008 +0200
Make repodiff always run in LANG=C
This is probably undesirable due to its impact on collation rules. If
the language is set in the environment, we should certainly be following it
It also will ignore specspo.
-sv
_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel
does this look more sane
diff --git a/repodiff.py b/repodiff.py
index e6d3d87..0062116 100755
--- a/repodiff.py
+++ b/repodiff.py
@@ -223,9 +223,13 @@ 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')
+ 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 not sys.stdout.isatty():
import codecs, locale
sys.stdout =
codecs.getwriter(locale.getpreferredencoding())(sys.stdout)
Tim
_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel