well a KeyboardInterupt is certainly not something you should ever catch in
this case ;)


On Sat, May 17, 2014 at 6:54 PM, Håkan W <notifications@github.com> wrote:

> In django/core/management/commands/startproject.py:
>
> > +
> > +            # translate e.g. "sv_SE" to django locale format "sv-se"
> > +            language_code = locale.lower().replace("_", "-")
> > +
> > +            # now check if this is actually a locale django supports out of the box
> > +            from django.conf import global_settings
> > +            available_languages = dict(global_settings.LANGUAGES)
> > +
> > +            # try to see if the exact variant exists translated, e.g. "pt-br" or at least "pt" exists
> > +            if language_code in available_languages or language_code.split('-')[0] in available_languages:
> > +                options['language_code'] = language_code
> > +            # if the language isn't available, fall back to US english.
> > +            else:
> > +                options['language_code'] = 'en-us'
> > +
> > +        except:
>
> @apollo13 <https://github.com/apollo13> but I really don't want to miss a
> type of exception and break the startproject command in any event, whatever
> the failure.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/django/django/pull/2669/files#r12769548>
> .
>