mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Internationalization for public errors
Currently, we throw many public exceptions without proper i18n. Wrap natural-language error messages in _() so they can be translated. In the service plugin, raise NotFound errors using handle_not_found helper so the error message contains the offending service. Use ScriptError instead of NotFoundError in bindinstance install. https://fedorahosted.org/freeipa/ticket/1953
This commit is contained in:
committed by
Martin Kosek
parent
4f03aed5e6
commit
a95eaeac8e
@@ -143,7 +143,7 @@ def check_writable_file(filename):
|
||||
open the file to test writability.
|
||||
"""
|
||||
if filename is None:
|
||||
raise errors.FileError(reason='Filename is empty')
|
||||
raise errors.FileError(reason=_('Filename is empty'))
|
||||
try:
|
||||
if os.path.exists(filename):
|
||||
if not os.access(filename, os.W_OK):
|
||||
|
||||
Reference in New Issue
Block a user