#19017 closed Bug (duplicate)
If command is called from code, it does not change locale to previous state
| Reported by: | 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 |
Description
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
Attachments (1)
Change History (4)
by , 13 years ago
| Attachment: | mgmt.patch added |
|---|
comment:1 by , 13 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
comment:3 by , 13 years ago
Same response that I gave for #19016, only security or crasher bugs in stable releases, sorry.
Note:
See TracTickets
for help on using tickets.
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!