enhance user console messages, and always use double quotes

This commit is contained in:
Christophe Benz 2010-04-08 18:27:08 +02:00
commit b29a3f223f
3 changed files with 9 additions and 9 deletions

View file

@ -54,10 +54,10 @@ class Backend(object):
value = config.get(name, field.default)
if value is None:
raise Backend.ConfigError("Missing parameter '%s' (%s)" % (name, field.description))
raise Backend.ConfigError('Missing parameter "%s" (%s)' % (name, field.description))
if field.regexp and re.match(field.regexp, str(value)):
raise Backend.ConfigError("Value of '%s' does not match regexp '%s'" % (name, field.regexp))
raise Backend.ConfigError('Value of "%s" does not match regexp "%s"' % (name, field.regexp))
if not field.default is None:
if isinstance(field.default, bool):