def wait_until_true(predicate, timeout=60, sleep=1, exception=None):
 try:
  with eventlet.timeout.Timeout(timeout):
   while (not predicate()):
    eventlet.sleep(sleep)
 except eventlet.TimeoutError:
  if (exception is None):
   debtcollector.deprecate('Raising eventlet.TimeoutError by default has been deprecated', message='wait_until_true() now raises WaitTimeout error by default.', version='Ocata', removal_version='Pike')
   exception = WaitTimeout(('Timed out after %d seconds' % timeout))
  raise exception

def wait_until_true ( predicate , timeout = 60 , sleep = 1 , exception = None ) : try : with eventlet . timeout . Timeout ( timeout ) : while ( not predicate ( ) ) : eventlet . sleep ( sleep ) except eventlet . TimeoutError : if ( exception is None ) : debtcollector . deprecate ( 'Raising eventlet.TimeoutError by default has been deprecated' , message = 'wait_until_true() now raises WaitTimeout error by default.' , version = 'Ocata' , removal_version = 'Pike' ) exception = WaitTimeout ( ( 'Timed out after %d seconds' % timeout ) ) raise exception
wait until callable predicate is evaluated as true .