From 6a1d6ee25f5d8a0ceb312a7ac8f6b92e57031b0b Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Thu, 27 Jun 2013 17:37:40 -0700 Subject: [PATCH] Elapsed time should account for the delay --- utilities/wait_for | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utilities/wait_for b/utilities/wait_for index a7fee8935fb..fd7b8cbc295 100644 --- a/utilities/wait_for +++ b/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)