mirror of https://github.com/django/django.git
[1.5.x] Fixed #19933 -- Catched ValueError in get_system_username
Thanks lanre.hbs at gmail.com for the report.
This commit is contained in:
parent
142728277a
commit
327c98ff08
|
@ -133,7 +133,10 @@ def get_system_username():
|
|||
# (a very restricted chroot environment, for example).
|
||||
return ''
|
||||
if not six.PY3:
|
||||
default_locale = locale.getdefaultlocale()[1]
|
||||
try:
|
||||
default_locale = locale.getdefaultlocale()[1]
|
||||
except ValueError:
|
||||
return ''
|
||||
if not default_locale:
|
||||
return ''
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue