mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Try/except
This commit is contained in:
parent
dd609eb440
commit
ea40816621
1 changed files with 10 additions and 3 deletions
|
@ -438,9 +438,16 @@ class AsyncClientMixin(object):
|
|||
if suffix in ('new',):
|
||||
return
|
||||
|
||||
outputter = self.opts.get('output', event.get('outputter', None) or event.get('return').get('outputter'))
|
||||
if event.get('return').get('outputter'):
|
||||
event['return'].pop('outputter')
|
||||
try:
|
||||
outputter = self.opts.get('output', event.get('outputter', None) or event.get('return').get('outputter'))
|
||||
except AttributeError:
|
||||
outputter = None
|
||||
|
||||
try:
|
||||
if event.get('return').get('outputter'):
|
||||
event['return'].pop('outputter')
|
||||
except AttributeError:
|
||||
pass
|
||||
# if this is a ret, we have our own set of rules
|
||||
if suffix == 'ret':
|
||||
# Check if ouputter was passed in the return data. If this is the case,
|
||||
|
|
Loading…
Add table
Reference in a new issue