diff options
author | Lynn Root <lroot@redhat.com> | 2012-11-08 10:06:35 -0500 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-12-11 10:52:06 +0100 |
commit | 173ee4d141958f198a706d65d4ee47c4a2ec31ed (patch) | |
tree | f03ad715dfa5f57ce676327f709831264d54612f /ipalib/constants.py | |
parent | 585b91df3b1fab9c865e00f522950003709ea23d (diff) | |
download | freeipa.git-173ee4d141958f198a706d65d4ee47c4a2ec31ed.tar.gz freeipa.git-173ee4d141958f198a706d65d4ee47c4a2ec31ed.tar.xz freeipa.git-173ee4d141958f198a706d65d4ee47c4a2ec31ed.zip |
Switch %r specifiers to '%s' in Public errors
This switch drops the preceding 'u' from strings within Public error messages.
This patch also addresses the related unfriendly 'u' from re-raising errors from netaddr.IPAddress by passing a bytestring through the function.
Also switched ValidationError to TypeError in validate_scalar per jcholast@redhat.com.
Ticket: https://fedorahosted.org/freeipa/ticket/3121
Ticket: https://fedorahosted.org/freeipa/ticket/2588
Diffstat (limited to 'ipalib/constants.py')
-rw-r--r-- | ipalib/constants.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ipalib/constants.py b/ipalib/constants.py index bf49375c..e6d95144 100644 --- a/ipalib/constants.py +++ b/ipalib/constants.py @@ -39,7 +39,7 @@ NULLS = (None, '', u'', tuple(), []) NAME_REGEX = r'^[a-z][_a-z0-9]*[a-z0-9]$|^[a-z]$' # Format for ValueError raised when name does not match above regex: -NAME_ERROR = 'name must match %r; got %r' +NAME_ERROR = "name must match '%s'; got '%s'" # Standard format for TypeError message: TYPE_ERROR = '%s: need a %r; got %r (a %r)' |