mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
The repr string formatting flag is required here. Resolves #33532.
This commit is contained in:
parent
778b290d94
commit
377556a221
@ -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) + '}'
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user