Opened 10 years ago

Closed 10 years ago

#21732 closed Cleanup/optimization (fixed)

compilemessages shouldn't crash if some LOCALE_PATHS is non writable

Reported by: Claude Paroz Owned by: nobody
Component: Internationalization Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Change History (2)

comment:1 by Claude Paroz, 10 years ago

Has patch: set
Version: 1.6master

comment:2 by Claude Paroz <claude@…>, 10 years ago

Resolution: fixed
Status: newclosed

In 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.

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