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