summaryrefslogtreecommitdiffstats
path: root/ipalib/constants.py
diff options
context:
space:
mode:
authorLynn Root <lroot@redhat.com>2012-11-08 10:06:35 -0500
committerMartin Kosek <mkosek@redhat.com>2012-12-11 10:52:06 +0100
commit173ee4d141958f198a706d65d4ee47c4a2ec31ed (patch)
treef03ad715dfa5f57ce676327f709831264d54612f /ipalib/constants.py
parent585b91df3b1fab9c865e00f522950003709ea23d (diff)
downloadfreeipa-173ee4d141958f198a706d65d4ee47c4a2ec31ed.tar.gz
freeipa-173ee4d141958f198a706d65d4ee47c4a2ec31ed.tar.xz
freeipa-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.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipalib/constants.py b/ipalib/constants.py
index bf49375ca..e6d951440 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)'