From 8f20534eca114aaa7504185bcd04a8ca3fa26bd3 Mon Sep 17 00:00:00 2001 From: Beojan Stanislaus <beojan.stanislaus@cern.ch> Date: Tue, 14 May 2024 08:38:00 +0200 Subject: [PATCH] SystemExit with string causes cryptic error -- Change to ValueError SystemExit with string causes cryptic error -- Change to ValueError --- .../RunDependentSim/RunDependentSimComps/python/PileUpUtils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Simulation/RunDependentSim/RunDependentSimComps/python/PileUpUtils.py b/Simulation/RunDependentSim/RunDependentSimComps/python/PileUpUtils.py index 7748d34815f2..07a56512f6e7 100644 --- a/Simulation/RunDependentSim/RunDependentSimComps/python/PileUpUtils.py +++ b/Simulation/RunDependentSim/RunDependentSimComps/python/PileUpUtils.py @@ -142,8 +142,7 @@ def generatePileUpProfile(flags, totalEvents = flags.ExecutorSplitting.TotalEvents if maxEvents == -1: - raise SystemExit("maxEvents = %d is not supported! Please set this to the number of events per file times the number of files per job." % ( - maxEvents,)) + raise ValueError("maxEvents = -1 is not supported! Please set this to the number of events per file times the number of files per job.") if not doNotCorrectMaxEvents and not flags.ExecutorSplitting.TotalSteps > 1: # round up to nearest 100 events.. corrMaxEvents = ceil(float(maxEvents) / 100.0) * 100.0 -- GitLab