diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2004-07-26 12:45:18 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2004-07-26 12:45:18 (GMT) |
commit | c8ae31dcbd20933abc2aadb4ab62aa8e99c81bf5 (patch) | |
tree | 1c73c9cf1c69d05df43ce32c33b6bab98cd9b30d /Lib/locale.py | |
parent | cc0f93233a1715ae8358fb0fa35b1ab8786bade3 (diff) | |
download | cpython-c8ae31dcbd20933abc2aadb4ab62aa8e99c81bf5.zip cpython-c8ae31dcbd20933abc2aadb4ab62aa8e99c81bf5.tar.gz cpython-c8ae31dcbd20933abc2aadb4ab62aa8e99c81bf5.tar.bz2 |
Patch #962487: Don't crash for empty locale names.
Diffstat (limited to 'Lib/locale.py')
-rw-r--r-- | Lib/locale.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/locale.py b/Lib/locale.py index 6e509a6..6c6eeea 100644 --- a/Lib/locale.py +++ b/Lib/locale.py @@ -337,7 +337,7 @@ def getdefaultlocale(envvars=('LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LANG')): lookup = os.environ.get for variable in envvars: localename = lookup(variable,None) - if localename is not None: + if localename: break else: localename = 'C' |