Commit 327c98ff authored by Claude Paroz's avatar Claude Paroz
Browse files

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

Thanks lanre.hbs at gmail.com for the report.
parent 14272827
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -133,7 +133,10 @@ def get_system_username():
        # (a very restricted chroot environment, for example).
        return ''
    if not six.PY3:
        try:
            default_locale = locale.getdefaultlocale()[1]
        except ValueError:
            return ''
        if not default_locale:
            return ''
        try: