mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
salt/modules/memcached.py: remove raw string formatting
This commit is contained in:
parent
284c42946c
commit
c1516b01aa
@ -222,10 +222,10 @@ def increment(key, delta=1, host=DEFAULT_HOST, port=DEFAULT_PORT):
|
|||||||
cur = get(key)
|
cur = get(key)
|
||||||
|
|
||||||
if cur is None:
|
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):
|
elif not isinstance(cur, integer_types):
|
||||||
raise CommandExecutionError(
|
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)
|
'incremented'.format(key)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -253,10 +253,10 @@ def decrement(key, delta=1, host=DEFAULT_HOST, port=DEFAULT_PORT):
|
|||||||
|
|
||||||
cur = get(key)
|
cur = get(key)
|
||||||
if cur is None:
|
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):
|
elif not isinstance(cur, integer_types):
|
||||||
raise CommandExecutionError(
|
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)
|
'decremented'.format(key)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user