mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Lint fixes for highstate outputter update
This commit is contained in:
parent
b93a9b57f1
commit
491b71379f
@ -197,13 +197,16 @@ def _format_host(host, data):
|
||||
|
||||
|
||||
def _format_changes(changes):
|
||||
global __opts__
|
||||
'''
|
||||
Format the changes dict based on what the data is
|
||||
'''
|
||||
global __opts__ # pylint: disable=W0601
|
||||
|
||||
if not changes:
|
||||
return False, ''
|
||||
|
||||
if not isinstance(changes, dict):
|
||||
return True, 'Invalid Changes data: {0}'.format(ret['changes'])
|
||||
return True, 'Invalid Changes data: {0}'.format(changes)
|
||||
|
||||
ret = changes.get('ret')
|
||||
if ret is not None and changes.get('out') == 'highstate':
|
||||
@ -211,7 +214,7 @@ def _format_changes(changes):
|
||||
changed = False
|
||||
for host, hostdata in ret.iteritems():
|
||||
s, c = _format_host(host, hostdata)
|
||||
ctext += '\n' + '\n'.join((' '* 14 + l) for l in s.splitlines())
|
||||
ctext += '\n' + '\n'.join((' ' * 14 + l) for l in s.splitlines())
|
||||
changed = changed or c
|
||||
else:
|
||||
changed = True
|
||||
@ -268,5 +271,4 @@ def _format_terse(tcolor, comps, ret, colors, tabular):
|
||||
result,
|
||||
colors['ENDC'],
|
||||
ret)
|
||||
|
||||
return msg
|
||||
|
Loading…
Reference in New Issue
Block a user