Issues

Issue #9 resolved

Exception when no environment variables are set

hello yajogo
created an issue
    def get_locale_language():
        u"""Get the language code for the current locale setting.
        """
        return locale.getlocale()[0] or locale.getdefaultlocale()[0]

If no environment variable are set, the above code will return None. The return value is then split(). This gives an exception. I suggest you add

or 'en_US'

on the end as a default fallback.

Comments (2)

  1. Log in to comment