def try_until_ready(command):
    while True:
        result = run_quick(command, echo=False)
        if not result.returncode:
            break
        msg = result.stderr or result.stdout
        if 0 > msg.find('refused'):
            print 'New instance does not seem ready yet...retry in 5s.'
        else:
            print msg.strip()
            print 'Retrying in 5s.'
        time.sleep(5)
dataset/ETHPy150Open spinnaker/spinnaker/dev/create_google_dev_vm.py/try_until_ready/swapped operands of `>`