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

Lib/locale.py

index ae6e55b3c4145d5aa3ad4aac2a99d1090cc0f9b0..bf799529a46034ee4d11d2a0e5905e716457ff01 100644 (file)
@@ -285,7 +285,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