def _bucket_exists(s3_conn, bucket_name):
    bucket = None
    for i in range(1, 6):
        try:
            # log.debug("Looking for bucket '%s'" % bucket_name)
            bucket = s3_conn.lookup(bucket_name)
            break
        except S3ResponseError:
            log.error ("Bucket '%s' not found, attempt %s/5" % (bucket_name, i+1))
            time.sleep(2)

    if bucket is not None:
        log.debug(bucket_name % "Cluster bucket '%s' found.")
        return True
    else:
        log.debug("Cluster bucket '%s' not found." % bucket_name)
        return False
dataset/ETHPy150Open chapmanb/cloudbiolinux/installed_files/ec2autorun.py/_bucket_exists/swapped operands of `%`