Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.5.x] Fixed #19933 -- Catched ValueError in get_system_username

Thanks lanre.hbs at gmail.com for the report.
  • Loading branch information...
commit 327c98ff08a95205919df4ae31dc633c1acec643 1 parent 1427282
Claude Paroz claudep authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 django/contrib/auth/management/__init__.py
5 django/contrib/auth/management/__init__.py
View
@@ -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:
Please sign in to comment.
Something went wrong with that request. Please try again.