]> granicus.if.org Git - python/commitdiff
Support '' as the argument for the setlocale emulation. Fixes #678259.
authorMartin v. Löwis <martin@v.loewis.de>
Sun, 30 Mar 2003 15:42:13 +0000 (15:42 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sun, 30 Mar 2003 15:42:13 +0000 (15:42 +0000)
Lib/locale.py

index 35512614690383125757d456d5bf421fa4626c33..2028948e9beefd52862ad8d1b1ec40f973ae8b03 100644 (file)
@@ -69,7 +69,7 @@ except ImportError:
         """ setlocale(integer,string=None) -> string.
             Activates/queries locale processing.
         """
-        if value is not None and value != 'C':
+        if value not in (None, '', 'C'):
             raise Error, '_locale emulation only supports "C" locale'
         return 'C'