diff --git a/moler/event_awaiter.py b/moler/event_awaiter.py index 5db8c4d58..942d2bb98 100644 --- a/moler/event_awaiter.py +++ b/moler/event_awaiter.py @@ -98,7 +98,10 @@ def start_command_after_event(cls, cmds, events, event_timeout=6): None """ events_cp = copy_list(events, deep_copy=False) - for cmd in cmds: + for cmd in cmds: + cmds_items = cmd + if isinstance(cmd, ConnectionObserver): + cmds_items = (cmd,) try: event = events_cp.pop(0) except IndexError: @@ -111,6 +114,7 @@ def start_command_after_event(cls, cmds, events, event_timeout=6): events_after_command = (event,) for event in events_after_command: event.start() - cmd.start() + for cmd_item in cmds_items: + cmd_item.start() for event in events_after_command: event.await_done(timeout=event_timeout)