Skip to content

Commit

Permalink
Further fix for compatibilty check
Browse files Browse the repository at this point in the history
In case no GT is passed, the check function should not
raise.
  • Loading branch information
nothingface0 committed Dec 4, 2024
1 parent 51f7132 commit 6591e30
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions utils/cmssw_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit 6591e30

Please sign in to comment.