Issue 962487: locale.getdefaultlocale fails with empty env. variable (original) (raw)
Issue962487
Created on 2004-05-28 22:27 by doko, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Messages (2) | ||
---|---|---|
msg46091 - (view) | Author: Matthias Klose (doko) * ![]() |
Date: 2004-05-28 22:27 |
[forwarded from http://bugs.debian.org/249816] When getdefaultlocale receives an empty string in one of the LANGUAGE, LC_ALL, LC_CTYPE or LANG variables it passes it to _parse_localename function causing a ValueError. It can be easily fixed by checking the truth value of the os.environ.get instead of checking if it's None. The added patch fixes the problem. 342c342 < if localename is not None: --- > if localename: | ||
msg46092 - (view) | Author: Martin v. Löwis (loewis) * ![]() |
Date: 2004-07-26 12:46 |
Logged In: YES user_id=21627 Thanks for the patch. Applied as locale.py 1.28 and 1.25.10.1. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:04 | admin | set | github: 40303 |
2004-05-28 22:27:12 | doko | create |