Fix spin-lock behavior in _iterate_timeout.

Change-Id: I95dc8f1500c954951afaf4d5c7d3b4094010d536
This commit is contained in:
Roberto Polli 2017-01-19 09:21:20 +01:00
parent e4dbb42695
commit 362af901d0

View File

@ -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(