diff --git a/salt/utils/jinja.py b/salt/utils/jinja.py index 25df07d3ed..1775bf1cf6 100644 --- a/salt/utils/jinja.py +++ b/salt/utils/jinja.py @@ -72,7 +72,7 @@ class SaltCacheLoader(BaseLoader): self.searchpath = opts['file_roots'][saltenv] else: self.searchpath = [path.join(opts['cachedir'], 'files', saltenv)] - log.debug('Jinja search path: \'{0}\''.format(self.searchpath)) + log.debug('Jinja search path: %s', self.searchpath) self._file_client = None self.cached = [] self.pillar_rend = pillar_rend @@ -163,10 +163,10 @@ class PrintableDict(OrderedDict): for key, value in six.iteritems(self): if isinstance(value, six.string_types): # keeps quotes around strings - output.append('\'{0}\': \'{1}\''.format(key, value)) + output.append('{0!r}: {1!r}'.format(key, value)) else: # let default output - output.append('\'{0}\': {1!s}'.format(key, value)) + output.append('{0!r}: {1!s}'.format(key, value)) return '{' + ', '.join(output) + '}' def __repr__(self): # pylint: disable=W0221 @@ -174,7 +174,7 @@ class PrintableDict(OrderedDict): for key, value in six.iteritems(self): # Raw string formatter required here because this is a repr # function. - output.append('\'{0}\': {1!r}'.format(key, value)) + output.append('{0!r}: {1!r}'.format(key, value)) return '{' + ', '.join(output) + '}'