]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
SF patch #1051395: locale.getdefaultlocale does not return tuple in some OS
authorRaymond Hettinger <python@rcn.com>
Sat, 1 Jan 2005 06:12:26 +0000 (06:12 +0000)
committerRaymond Hettinger <python@rcn.com>
Sat, 1 Jan 2005 06:12:26 +0000 (06:12 +0000)
(Contributed by Jiwon Seo.)

Lib/locale.py

index 6c6eeeafae8903affddd6a8385b9186d402703e0..a23181044cae36c6131852bd6f06f2a9e142676e 100644 (file)
@@ -272,7 +272,7 @@ def _parse_localename(localename):
             return code, 'iso-8859-15'
 
     if '.' in code:
-        return code.split('.')[:2]
+        return tuple(code.split('.')[:2])
     elif code == 'C':
         return None, None
     raise ValueError, 'unknown locale: %s' % localename