Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#19017 closed Bug (duplicate)

If command is called from code, it does not change locale to previous state

Reported by: andrey@… Owned by: nobody
Component: Core (Management commands) Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Currently code is:

        except CommandError, e:
             if show_traceback:
                 self.stderr.write(smart_str('Error: %s\n' % e)))
        if saved_lang is not None:

So if command raises exception, translation is not restored

Attachments (1)

mgmt.patch (621 bytes) - added by andrey@… 3 years ago.

Download all attachments as: .zip

Change History (4)

Changed 3 years ago by andrey@…

comment:1 Changed 3 years ago by claudep

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #17947 (already fixed). Thanks for the report, but try to look at latest code before submitting ticket and patch, this will save you time!

comment:2 Changed 3 years ago by gugu

Can somebody fix it in 1.4 branch?

comment:3 Changed 3 years ago by claudep

Same response that I gave for #19016, only security or crasher bugs in stable releases, sorry.

Note: See TracTickets for help on using tickets.
Back to Top