diff --git a/Configuration/Applications/python/ConfigBuilder.py b/Configuration/Applications/python/ConfigBuilder.py index 5a5a16d68806d..6d48967475b97 100644 --- a/Configuration/Applications/python/ConfigBuilder.py +++ b/Configuration/Applications/python/ConfigBuilder.py @@ -153,14 +153,14 @@ def filesFromDASQuery(query,option="",s=None): if line.count(".root")>=2: #two files solution... entries=line.replace("\n","").split() - if not entries[0] in prim: - prim.append(entries[0]) - if not entries[1] in sec: - sec.append(entries[1]) + prim.append(entries[0]) + sec.append(entries[1]) elif (line.find(".root")!=-1): entry=line.replace("\n","") - if not entry in prim: - prim.append(entry) + prim.append(entry) + # remove any duplicates + prim = sorted(list(set(prim))) + sec = sorted(list(set(sec))) if s: if not hasattr(s,"fileNames"): s.fileNames=cms.untracked.vstring(prim)