[Django] #21732: compilemessages shouldn't crash if some LOCALE_PATHS is non writable

51 views
Skip to first unread message

Django

unread,
Jan 4, 2014, 12:10:03 PM1/4/14
to django-...@googlegroups.com
#21732: compilemessages shouldn't crash if some LOCALE_PATHS is non writable
------------------------------------------------+------------------------
Reporter: claudep | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Internationalization | Version: 1.6
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
Scenario: you have added a path in LOCALE_PATHS for some system-wide (non-
writable) location. When you run `./manage.py compilemessages`, you get a
`CommandError`:
{{{
CommandError: Execution of msgfmt failed:
msgfmt: error while opening
"/path/to/nonwritable/localedir/lang/LC_MESSAGES/messages.mo" for writing:
Permission denied
}}}

Instead we should report the error on stderr and continue running the
command.

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

Django

unread,
Jan 4, 2014, 4:53:09 PM1/4/14
to django-...@googlegroups.com
#21732: compilemessages shouldn't crash if some LOCALE_PATHS is non writable
--------------------------------------+------------------------------------

Reporter: claudep | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Internationalization | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by claudep):

* has_patch: 0 => 1
* version: 1.6 => master


Comment:

https://github.com/django/django/pull/2146

--
Ticket URL: <https://code.djangoproject.com/ticket/21732#comment:1>

Django

unread,
Feb 18, 2014, 7:39:26 AM2/18/14
to django-...@googlegroups.com
#21732: compilemessages shouldn't crash if some LOCALE_PATHS is non writable
--------------------------------------+------------------------------------
Reporter: claudep | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: Internationalization | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Claude Paroz <claude@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"621c5cf4a501c8e80348df0ddbe726defd6be2ed"]:
{{{
#!CommitTicketReference repository=""
revision="621c5cf4a501c8e80348df0ddbe726defd6be2ed"
Fixed #21732 -- Made compilemessages complain about non-writable location

Instead of crashing with a CommandError, now a non-writable location
of mo files will only make compilemessages complain and continue.
Thanks Ramiro Morales for the review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/21732#comment:2>

Reply all
Reply to author
Forward
0 new messages