mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
salt/utils/pyobjects.py: remove raw string formatting
This commit is contained in:
parent
1b0a83b9b9
commit
9b7e5027fe
@ -86,7 +86,7 @@ class Registry(object):
|
|||||||
if id_ in attr:
|
if id_ in attr:
|
||||||
if state.full_func in attr[id_]:
|
if state.full_func in attr[id_]:
|
||||||
raise DuplicateState(
|
raise DuplicateState(
|
||||||
"A state with id '{0!r}', type '{1!r}' exists".format(
|
"A state with id '\'{0}\'', type '\'{1}\'' exists".format(
|
||||||
id_,
|
id_,
|
||||||
state.full_func
|
state.full_func
|
||||||
)
|
)
|
||||||
@ -170,8 +170,8 @@ class StateFactory(object):
|
|||||||
|
|
||||||
def __getattr__(self, func):
|
def __getattr__(self, func):
|
||||||
if len(self.valid_funcs) > 0 and func not in self.valid_funcs:
|
if len(self.valid_funcs) > 0 and func not in self.valid_funcs:
|
||||||
raise InvalidFunction('The function {0!r} does not exist in the '
|
raise InvalidFunction('The function \'{0}\' does not exist in the '
|
||||||
'StateFactory for {1!r}'.format(
|
'StateFactory for \'{1}\''.format(
|
||||||
func,
|
func,
|
||||||
self.module
|
self.module
|
||||||
))
|
))
|
||||||
|
Loading…
Reference in New Issue
Block a user