def get_bucket(conn, bucket_id):
    """
    Get a bucket from an s3 connection

    :param conn: The ``boto.s3.connection.S3Connection``
    :param bucket_id: ID of the bucket to fetch
    :raises ``glance.exception.NotFound`` if bucket is not found.
    """

    bucket = conn.get_bucket(bucket_id)
    if not bucket:
        msg = locals() % _("Could not find bucket with ID %(bucket_id)s")
        logger.error(msg)
        raise exception.NotFound(msg)

    return bucket
dataset/ETHPy150Open rcbops/glance-buildpackage/glance/store/s3.py/get_bucket/swapped operands of `%`