From 38bce5e639c9ef3c8eb125090d0d2d0567c4afc2 Mon Sep 17 00:00:00 2001 From: Efe Date: Wed, 7 Feb 2024 17:31:02 +0100 Subject: [PATCH] scram arch check for sherpa converted warning --- bin/utils/request_fragment_check.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/bin/utils/request_fragment_check.py b/bin/utils/request_fragment_check.py index 8cc1e5b7528..2881b4195b8 100755 --- a/bin/utils/request_fragment_check.py +++ b/bin/utils/request_fragment_check.py @@ -770,10 +770,12 @@ def root_requests_from_ticket(ticket_prepid, include_docs=False): if len(scram_sherpa): scram_sherpa = scram_sherpa[0] print ("scram_arch for Sherpa = ",scram_sherpa) - if scram_sherpa == scram_arch: - print ("[OK] scram_arch for Sherpa and CMSSW are the same") - else: - errors.append("scram_arch for Sherpa and CMSSW are NOT the same. But note that this check is done based on folder names except the one for CMSSW") + print(len(scram_sherpa[0])) + if len(scram_sherpa[0]) != 0: + if scram_sherpa == scram_arch: + print ("[OK] scram_arch for Sherpa and CMSSW are the same") + else: + errors.append("scram_arch for Sherpa and CMSSW are NOT the same. But note that this check is done based on folder names except the one for CMSSW") else: warnings.append("scram_arch for Sherpa unidentifiable") sv_tmp = re.findall("sherpa/.*/",gridpack_cvmfs_path_tmp)[0].split("/")[1].split(".") @@ -786,7 +788,8 @@ def root_requests_from_ticket(ticket_prepid, include_docs=False): openloops_flag = True OL_list = os.popen('grep openloops '+pi_file).read().split("/") scram_OL = [s for s in OL_list if "gcc" in s] - if len(scram_OL): + print(scram_OL) + if len(scram_OL) and len(scram_sherpa): scram_OL = scram_OL[0] print ("scram_arch for OpenLoops = ",scram_OL) if scram_OL == scram_sherpa: