def get_or_make_download(user_id, volume_id, path, download_url, dl_key):
    """Get or make a download if it doesn't already exist."""
    gw = SystemGateway()
    try:
        download = gw.get_download(user_id, volume_id, path, download_url,
                                   dl_key)
    except errors.DoesNotExist:
        download = gw.make_download(user_id, volume_id, path, download_url,
                                    dl_key)
    return download
def get_or_make_download(user_id, volume_id, path, download_url, dl_key):
    """Get or make a download if it doesn't already exist."""
    gw = SystemGateway()
    try:
        download = gw.get_download(
            user_id, volume_id, path, download_url, dl_key)
    except errors.DoesNotExist:
        download = gw.make_download(
            user_id, volume_id, path, download_url, dl_key)
    return download
def make_download(user_id, udf_id, file_path, download_url, download_key=None):
    """Create a new download object."""
    gw = SystemGateway()
    return gw.make_download(user_id, udf_id, file_path, download_url,
                            download_key)
def make_download(user_id, udf_id, file_path, download_url, download_key=None):
    """Create a new download object."""
    gw = SystemGateway()
    return gw.make_download(
        user_id, udf_id, file_path, download_url, download_key)