Fix the output of cta-prod-show-dataset
Fix the cta-prod-show-dataset
output for the case where the dataset does not exist.
Currently we get:
$ cta-prod-show-dataset Prod6_Paranal_Prod6-Hyperarray_NSB1x_gamma-diffuse_North_20deg_0.008div_R1_test
Available datasets: 1
Prod6_Paranal_Prod6-Hyperarray_NSB1x_gamma-diffuse_North_20deg_0.008div_R1_test
Storage usage for all datasets
|_. Name |_. N files |_. Size(TB) |
Traceback (most recent call last):
File "/Users/arrabito/ctadirac_client/diracos/bin/cta-prod-show-dataset", line 8, in <module>
sys.exit(main())
File "/Users/arrabito/ctadirac_client/diracos/lib/python3.9/site-packages/DIRAC/Core/Base/Script.py", line 74, in __call__
return entrypointFunc._func()
File "/Users/arrabito/PycharmProjects/CTADIRAC/src/CTADIRAC/Core/scripts/cta_prod_show_dataset.py", line 226, in main
name, n_files, size, mq = get_dataset_info(dataset_name)
File "/Users/arrabito/PycharmProjects/CTADIRAC/src/CTADIRAC/Core/scripts/cta_prod_show_dataset.py", line 49, in get_dataset_info
res = dataset_dict['Successful'][dataset_name][dataset_name]
KeyError: 'Prod6_Paranal_Prod6-Hyperarray_NSB1x_gamma-diffuse_North_20deg_0.008div_R1_test'