Merge "Fix spin-lock behavior in _iterate_timeout."

This commit is contained in:
Jenkins 2017-01-21 07:09:03 +00:00 committed by Gerrit Code Review
commit efe7b8d469
1 changed files with 3 additions and 0 deletions

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(