Commit 796c3a16 authored by payno's avatar payno
Browse files

utils: get_compacted_slices: fix issue if urls are empty

parent 1eae3e11
Pipeline #65073 failed with stage
in 35 seconds
......@@ -46,6 +46,9 @@ def get_compacted_dataslices(urls, subsampling=None):
def merge_slices(slice1, slice2):
return slice(slice1.start, slice2.stop)
if len(urls) == 0:
return urls
sorted_files_indices = sorted(urls.keys())
idx0 = sorted_files_indices[0]
first_url = urls[idx0]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment