#19017: If command is called from code, it does not change locale to previous 
state
--------------------------------------------+--------------------
     Reporter:  andrey@…                    |      Owner:  nobody
         Type:  Bug                         |     Status:  new
    Component:  Core (Management commands)  |    Version:  1.4
     Severity:  Normal                      |   Keywords:
 Triage Stage:  Unreviewed                  |  Has patch:  1
Easy pickings:  0                           |      UI/UX:  0
--------------------------------------------+--------------------
 Currently code is:

 {{{
         except CommandError, e:
              if show_traceback:
                  traceback.print_exc()
              else:
                  self.stderr.write(smart_str(self.style.ERROR('Error:
 %s\n' % e)))
              sys.exit(1)
         if saved_lang is not None:
             translation.activate(saved_lang)
 }}}

 So if command raises exception, translation is not restored

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19017>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to