Adds check for engine before adding the additional engine argument

The additional engine argument is only intended to be used with the
_check_list_minons engine and shouldn't be added for every other engine.
This commit is contained in:
Jochen Breuer 2018-09-12 20:02:31 +02:00
parent 7d0b20c91e
commit 649c46cc4d
No known key found for this signature in database
GPG Key ID: 29ACE79F4D5EEE69

View File

@ -572,8 +572,10 @@ class CkMinions(object):
engine_args.append(target_info['delimiter'] or ':')
engine_args.append(greedy)
# ignore missing minions if we exclude them with a 'not'
engine_args.append(results and results[-1] == '-')
# ignore missing minions for lists if we exclude them with
# a 'not'
if 'L' == target_info['engine']:
engine_args.append(results and results[-1] == '-')
_results = engine(*engine_args)
results.append(six.text_type(set(_results['minions'])))
missing.extend(_results['missing'])