diff --git a/salt/utils/pyobjects.py b/salt/utils/pyobjects.py index 9d32ae12d9..762080e993 100644 --- a/salt/utils/pyobjects.py +++ b/salt/utils/pyobjects.py @@ -86,7 +86,7 @@ class Registry(object): if id_ in attr: if state.full_func in attr[id_]: raise DuplicateState( - "A state with id '{0!r}', type '{1!r}' exists".format( + "A state with id '\'{0}\'', type '\'{1}\'' exists".format( id_, state.full_func ) @@ -170,8 +170,8 @@ class StateFactory(object): def __getattr__(self, func): if len(self.valid_funcs) > 0 and func not in self.valid_funcs: - raise InvalidFunction('The function {0!r} does not exist in the ' - 'StateFactory for {1!r}'.format( + raise InvalidFunction('The function \'{0}\' does not exist in the ' + 'StateFactory for \'{1}\''.format( func, self.module ))