(domain, build_id)
fast lookup of app version number given build_id

    implemented as simple caching around _get_version_from_build_id
fast lookup of app version number given build_id
fast lookup of app version number given build_id
def get_version_from_build_id(domain, build_id):
    """
    fast lookup of app version number given build_id

    implemented as simple caching around _get_version_from_build_id

    """
    if not build_id:
        return None

    try:
        build = get_app(domain, build_id)
    except (ResourceNotFound, Http404):
        return None
    if not build.copy_of:
        return None
    elif build.domain != domain:
        return None
    else:
        return build.version
def get_version_from_build_id ( domain , build_id ) : if not build_id : return None try : build = get_app ( domain , build_id ) except ( ResourceNotFound , Http404 ) : return None if not build . copy_of : return None elif build . domain != domain : return None else : return build . version