diff --git a/riocli/device/util.py b/riocli/device/util.py index 98641755..4501d977 100644 --- a/riocli/device/util.py +++ b/riocli/device/util.py @@ -95,11 +95,11 @@ def decorated(**kwargs): click.secho(str(e), fg=Colors.RED) raise SystemExit(1) + file_name = kwargs.pop('file_name') + device_guid = kwargs.get('device_guid') device = client.get_device(device_id=device_guid) - requests = device.list_uploaded_files_for_device() - - file_name = kwargs.pop('file_name') + requests = device.list_uploaded_files_for_device(filter_by_filename=file_name) file_name, request_id = find_request_id(requests, file_name)