Skip to content
Snippets Groups Projects
Commit 791f3906 authored by Gitlab CI's avatar Gitlab CI Committed by Chenjia Zhang
Browse files
parent 16813425
No related branches found
No related tags found
1 merge request!348Modify the functions in FileFromDirac
Pipeline #6195061 passed
......@@ -14,7 +14,11 @@ import subprocess
from collections import defaultdict
def get_access_urls_mc(bkkpath, evttype, filetypes, sites_to_remove=[], max_files=500):
def get_access_urls_mc(bkkpath,
evttype,
filetypes,
sites_to_remove=[],
max_files=500):
customEnv = {}
# set custom grid proxy path if exists
......@@ -70,7 +74,9 @@ def get_access_urls_mc(bkkpath, evttype, filetypes, sites_to_remove=[], max_file
# Filter out some failing grid sites/files from the list
excluded = ['stfc.ac.uk'] + sites_to_remove
lfns = [lfn for lfn in lfns_tmp if not any(site in lfn for site in excluded)]
lfns = [
lfn for lfn in lfns_tmp if not any(site in lfn for site in excluded)
]
lfns = sorted(lfns, key=lambda str: not "eoslhcb.cern.ch" in str)
return lfns
......@@ -141,13 +147,12 @@ def get_access_urls_data(bkkpath, sites_to_remove=[], max_files=500):
# Filter out some failing grid sites/files from the list
excluded = ['stfc.ac.uk'] + sites_to_remove
lfns = [lfn for lfn in lfns_tmp if not any(site in lfn for site in excluded)]
lfns = [
lfn for lfn in lfns_tmp if not any(site in lfn for site in excluded)
]
lfns = sorted(lfns, key=lambda str: not "eoslhcb.cern.ch" in str)
return lfns
# TODO warn if some of the first N files was not resolved to a URL
# since then one would get numerically different results.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment