From 6591e309124e145a987e0dced29ec26e66f110b2 Mon Sep 17 00:00:00 2001 From: Dimitris Papagiannis Date: Wed, 4 Dec 2024 14:30:20 +0100 Subject: [PATCH] Further fix for compatibilty check In case no GT is passed, the check function should not raise. --- utils/cmssw_deploy.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/cmssw_deploy.py b/utils/cmssw_deploy.py index adf7309..74a0c1d 100644 --- a/utils/cmssw_deploy.py +++ b/utils/cmssw_deploy.py @@ -169,6 +169,8 @@ def update_gt(filepath, new_gt): def check_gt_compatibility_or_raise(cmssw_version: str, gt: str): + if not cmssw_version or not gt: + return cmssw_major, cmssw_minor = cmssw_version.split("_")[1:3] if not gt.startswith("".join([cmssw_major, cmssw_minor])): raise Exception(f"Global Tag {gt} is incompatible with {cmssw_version}")