diff --git a/library/utilities/wait_for b/library/utilities/wait_for index a7fee8935fb..fd7b8cbc295 100644 --- a/library/utilities/wait_for +++ b/library/utilities/wait_for @@ -92,11 +92,11 @@ def main(): port = int(params['port']) state = params['state'] + start = datetime.datetime.now() + if delay: time.sleep(delay) - start = datetime.datetime.now() - if state == 'stopped': ### first wait for the host to go down end = start + datetime.timedelta(seconds=timeout)