Skip to content

Commit

Permalink
[1.5.x] Fixed #19933 -- Catched ValueError in get_system_username
Browse files Browse the repository at this point in the history
Thanks lanre.hbs at gmail.com for the report.
  • Loading branch information
claudep committed Mar 2, 2013
1 parent 1427282 commit 327c98f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion django/contrib/auth/management/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 327c98f

Please sign in to comment.