mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix regex issue with impropper use of getattr, remove apply functions, they are
deprecated
This commit is contained in:
parent
ec6672168d
commit
21c9287855
1 changed files with 2 additions and 2 deletions
|
@ -96,14 +96,14 @@ class Minion(object):
|
|||
return ret
|
||||
# Verify that the publication applies to this minion
|
||||
if data.has_key('tgt_type'):
|
||||
if not apply(self, '_' + data['tgt_type'] + 'match', data['tgt']):
|
||||
if not getattr(self, '_' + data['tgt_type'] + '_match')(*(data['tgt'])):
|
||||
return ret
|
||||
else:
|
||||
if not self._glob_match(data['tgt']):
|
||||
return ret
|
||||
|
||||
if self.functions.has_key(data['fun']):
|
||||
ret['return'] = apply(self.functions[data['fun']], data['arg'])
|
||||
ret['return'] = self.functions[data['fun']](*data['arg'])
|
||||
ret['jid'] = data['jid']
|
||||
return ret
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue