From c8ae31dcbd20933abc2aadb4ab62aa8e99c81bf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Mon, 26 Jul 2004 12:45:18 +0000 Subject: Patch #962487: Don't crash for empty locale names. --- Lib/locale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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' -- cgit v0.12