mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
Apply suggestions from code review
more pythonic if/then/else on list Co-authored-by: Pedro Algarvio <pedro@algarvio.me>
This commit is contained in:
parent
72bd29cdc8
commit
8006ca52bb
1 changed files with 2 additions and 2 deletions
|
@ -693,13 +693,13 @@ def wait_for_event(name, id_list, event_id="id", timeout=300, node="master"):
|
|||
|
||||
val_list = [id for id in id_list if id in val]
|
||||
|
||||
if len(val_list) == 0:
|
||||
if not val_list:
|
||||
log.trace(
|
||||
"wait_for_event: Event identifier '%s' not in "
|
||||
"id_list; skipping",
|
||||
event_id,
|
||||
)
|
||||
elif len(val_list) > 0:
|
||||
elif val_list:
|
||||
minions_seen = ret["changes"].setdefault("minions_seen", [])
|
||||
for found_val in val_list:
|
||||
id_list.remove(found_val)
|
||||
|
|
Loading…
Add table
Reference in a new issue