salt/modules/memcached.py: remove raw string formatting

This commit is contained in:
Erik Johnson 2015-08-31 18:33:20 -05:00
parent 284c42946c
commit c1516b01aa

View File

@ -222,10 +222,10 @@ def increment(key, delta=1, host=DEFAULT_HOST, port=DEFAULT_PORT):
cur = get(key)
if cur is None:
raise CommandExecutionError('Key {0!r} does not exist'.format(key))
raise CommandExecutionError('Key \'{0}\' does not exist'.format(key))
elif not isinstance(cur, integer_types):
raise CommandExecutionError(
'Value for key {0!r} must be an integer to be '
'Value for key \'{0}\' must be an integer to be '
'incremented'.format(key)
)
@ -253,10 +253,10 @@ def decrement(key, delta=1, host=DEFAULT_HOST, port=DEFAULT_PORT):
cur = get(key)
if cur is None:
raise CommandExecutionError('Key {0!r} does not exist'.format(key))
raise CommandExecutionError('Key \'{0}\' does not exist'.format(key))
elif not isinstance(cur, integer_types):
raise CommandExecutionError(
'Value for key {0!r} must be an integer to be '
'Value for key \'{0}\' must be an integer to be '
'decremented'.format(key)
)