From 362af901d00b8e46ef734a9e33e29f831fbc4a24 Mon Sep 17 00:00:00 2001 From: Roberto Polli Date: Thu, 19 Jan 2017 09:21:20 +0100 Subject: [PATCH] Fix spin-lock behavior in _iterate_timeout. Change-Id: I95dc8f1500c954951afaf4d5c7d3b4094010d536 --- shade/_utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shade/_utils.py b/shade/_utils.py index 9b2e94003..7ab9bfe29 100644 --- a/shade/_utils.py +++ b/shade/_utils.py @@ -56,6 +56,9 @@ def _iterate_timeout(timeout, message, wait=2): # seems friendlier if wait is None: wait = 2 + elif wait == 0: + # wait should be < timeout, unless timeout is None + wait = 0.1 if timeout is None else min(0.1, timeout) wait = float(wait) except ValueError: raise exc.OpenStackCloudException(