Skip to content
Snippets Groups Projects
Commit c5b966d6 authored by Geneviève Boucher's avatar Geneviève Boucher Committed by Albert Feghaly
Browse files

Updating the get_datafiles_list use to avoid having the deprecated message

Adding print statement when dataset id and datafile id is submitted
Mini change to print statement
parent eeb31589
No related tags found
1 merge request!20Resolve "Download datafile directly without asking for dataset ID"
......@@ -103,7 +103,7 @@ class Client:
except:
self.datafiles = None
sys.stderr.write(
'get_available_datafiles() method is not ' +
'WARNING: get_available_datafiles() method is not ' +
'implemented in api/v1 of IRIC-Data\n'
)
......
......@@ -32,6 +32,10 @@ def main():
dsid = args['dataset_id']
dfid = args['datafile_id']
if dfid and dsid:
print("You've submitted a datafile id and a dataset id")
print("Dataset ID will be ignored")
if dfid:
print('Datafile ID: OK')
else:
......@@ -45,7 +49,7 @@ def main():
print('No dataset for user %s' % args['username'])
return
df = client.get_dataset_filelist(dsid)
df = client.get_datafiles_list(dataset_id=dsid)
if not df.empty:
print(df)
print('Download datafile using ID or complete dataset using "all"')
......@@ -88,7 +92,7 @@ def main():
print(client.labs)
print(client.datasets)
dsid = input('Enter dataset ID: ')
df = client.get_dataset_filelist(dsid)
df = client.get_datafiles_list(dataset_id=dsid)
if not df.empty:
print(df)
file_id = input('Enter file ID: ')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment