mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
[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).
|
# (a very restricted chroot environment, for example).
|
||||||
return ''
|
return ''
|
||||||
if not six.PY3:
|
if not six.PY3:
|
||||||
default_locale = locale.getdefaultlocale()[1]
|
try:
|
||||||
|
default_locale = locale.getdefaultlocale()[1]
|
||||||
|
except ValueError:
|
||||||
|
return ''
|
||||||
if not default_locale:
|
if not default_locale:
|
||||||
return ''
|
return ''
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user