VMM: check_localpart() use '%s' instead of %r in error messages. v0.6.x
authorPascal Volk <neverseen@users.sourceforge.net>
Fri, 02 Apr 2010 17:30:44 +0000
branchv0.6.x
changeset 234 e88ba0fb1281
parent 233 55503d63ba30
child 235 9d3405ed08e5
VMM: check_localpart() use '%s' instead of %r in error messages.
VirtualMailManager/__init__.py
--- a/VirtualMailManager/__init__.py	Sun Mar 21 09:59:05 2010 +0000
+++ b/VirtualMailManager/__init__.py	Fri Apr 02 17:30:44 2010 +0000
@@ -134,12 +134,12 @@
 
     """
     if len(localpart) > 64:
-        raise VMMError(_(u'The local-part %r is too long') % localpart,
+        raise VMMError(_(u"The local-part '%s' is too long") % localpart,
                        LOCALPART_TOO_LONG)
     invalid_chars = set(RE_LOCALPART.findall(localpart))
     if invalid_chars:
         i_chars = u''.join((u'"%s" ' % c for c in invalid_chars))
-        raise VMMError(_(u"The local-part %(l_part)r contains invalid \
+        raise VMMError(_(u"The local-part '%(l_part)s' contains invalid \
 characters: %(i_chars)s") %
                        {'l_part': localpart, 'i_chars': i_chars},
                        LOCALPART_INVALID)