mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #43974 from isbm/isbm-tgttype-fix-dev
Bugfix: always return a string "list" on unknown job target type.
This commit is contained in:
commit
bd557c1017
@ -313,7 +313,7 @@ def _format_job_instance(job):
|
||||
'Arguments': list(job.get('arg', [])),
|
||||
# unlikely but safeguard from invalid returns
|
||||
'Target': job.get('tgt', 'unknown-target'),
|
||||
'Target-type': job.get('tgt_type', []),
|
||||
'Target-type': job.get('tgt_type', 'list'),
|
||||
'User': job.get('user', 'root')}
|
||||
|
||||
if 'metadata' in job:
|
||||
|
@ -170,7 +170,7 @@ def _format_job_instance(job):
|
||||
'Arguments': json.loads(job.get('arg', '[]')),
|
||||
# unlikely but safeguard from invalid returns
|
||||
'Target': job.get('tgt', 'unknown-target'),
|
||||
'Target-type': job.get('tgt_type', []),
|
||||
'Target-type': job.get('tgt_type', 'list'),
|
||||
'User': job.get('user', 'root')}
|
||||
# TODO: Add Metadata support when it is merged from develop
|
||||
return ret
|
||||
|
@ -543,7 +543,7 @@ def _format_job_instance(job):
|
||||
'Arguments': list(job.get('arg', [])),
|
||||
# unlikely but safeguard from invalid returns
|
||||
'Target': job.get('tgt', 'unknown-target'),
|
||||
'Target-type': job.get('tgt_type', []),
|
||||
'Target-type': job.get('tgt_type', 'list'),
|
||||
'User': job.get('user', 'root')}
|
||||
|
||||
if 'metadata' in job:
|
||||
|
@ -75,7 +75,7 @@ def format_job_instance(job):
|
||||
'Arguments': list(job.get('arg', [])),
|
||||
# unlikely but safeguard from invalid returns
|
||||
'Target': job.get('tgt', 'unknown-target'),
|
||||
'Target-type': job.get('tgt_type', []),
|
||||
'Target-type': job.get('tgt_type', 'list'),
|
||||
'User': job.get('user', 'root')}
|
||||
|
||||
if 'metadata' in job:
|
||||
|
Loading…
Reference in New Issue
Block a user