Commit c8ae31dc authored by Martin v. Löwis's avatar Martin v. Löwis

Patch #962487: Don't crash for empty locale names.

parent cc0f9323
......@@ -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'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment