7 query =
'dataset dataset=%s' % dataset
8 host =
'https://cmsweb.cern.ch'
18 if not jsondict[
'data']
or not jsondict[
'data'][0][
'dataset']:
19 sys.stderr.write(
'Error: the pattern "%s" does not match any dataset\n' % dataset)
22 elif len(jsondict[
'data']) > 1:
23 sys.stderr.write(
'Error: the pattern "%s" matches multiple datasets\n' % dataset)
24 for d
in jsondict[
'data']:
25 sys.stderr.write(
' %s\n' % d[
'dataset'][0][
'name'])
30 dataset = jsondict[
'data'][0][
'dataset'][0][
'name']
31 query =
'file dataset=%s' % dataset
34 files = sorted( f[
'file'][0][
'name']
for f
in jsondict[
'data'] )