def get_status_by_id(user_id, dl_id): """Get the status of the download.""" gw = SystemGateway() try: download = gw.get_download_by_id(user_id, dl_id) except errors.DoesNotExist: return UNKNOWN return get_status_from_download(user_id, download)
def get_status_by_id(user_id, dl_id): """Get the status of the download.""" gw = SystemGateway() try: download = gw.get_download_by_id(user_id, dl_id) except errors.DoesNotExist: return UNKNOWN return get_status_from_download(user_id, download)
def get_download_by_id(user_id, download_id): """Get a download by its ID.""" gw = SystemGateway() return gw.get_download_by_id(user_id, download_id)
def get_download_by_id(user_id, download_id): """Get a download by its ID.""" gw = SystemGateway() return gw.get_download_by_id(user_id, download_id)