mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Make the module functions able to throw exceptions
This commit is contained in:
parent
b26313de20
commit
6082e850e1
1 changed files with 3 additions and 3 deletions
|
@ -141,10 +141,10 @@ class Minion(object):
|
|||
if not self._glob_match(data['tgt']):
|
||||
return ret
|
||||
|
||||
if self.functions.has_key(data['fun']):
|
||||
try:
|
||||
ret['return'] = self.functions[data['fun']](*data['arg'])
|
||||
else:
|
||||
ret['return'] = Exception('Failed to find the specified module')
|
||||
except Exception as exc:
|
||||
ret['return'] = exc
|
||||
ret['jid'] = data['jid']
|
||||
return ret
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue