mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
salt/utils/jinja.py: remove raw string formatting
This commit is contained in:
parent
f446d462c4
commit
d5a7dcca06
1 changed files with 4 additions and 4 deletions
|
@ -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!r}'.format(self.searchpath))
|
||||
log.debug('Jinja search path: \'{0}\''.format(self.searchpath))
|
||||
self._file_client = None
|
||||
self.cached = []
|
||||
self.pillar_rend = pillar_rend
|
||||
|
@ -163,16 +163,16 @@ class PrintableDict(OrderedDict):
|
|||
for key, value in six.iteritems(self):
|
||||
if isinstance(value, six.string_types):
|
||||
# keeps quotes around strings
|
||||
output.append('{0!r}: {1!r}'.format(key, value))
|
||||
output.append('\'{0}\': \'{1}\''.format(key, value))
|
||||
else:
|
||||
# let default output
|
||||
output.append('{0!r}: {1!s}'.format(key, value))
|
||||
output.append('\'{0}\': {1!s}'.format(key, value))
|
||||
return '{' + ', '.join(output) + '}'
|
||||
|
||||
def __repr__(self): # pylint: disable=W0221
|
||||
output = []
|
||||
for key, value in six.iteritems(self):
|
||||
output.append('{0!r}: {1!r}'.format(key, value))
|
||||
output.append('\'{0}\': \'{1}\''.format(key, value))
|
||||
return '{' + ', '.join(output) + '}'
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue