From 2927fc942d7ebe4673e86cbfcf167e6ca3363c74 Mon Sep 17 00:00:00 2001 From: mmusich Date: Thu, 8 Jul 2021 10:28:58 +0200 Subject: [PATCH] do not go in error if it's run=1 (that's MC) --- CondCore/Utilities/scripts/conddb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CondCore/Utilities/scripts/conddb b/CondCore/Utilities/scripts/conddb index fdd527a5fa3c2..bfad44d755160 100755 --- a/CondCore/Utilities/scripts/conddb +++ b/CondCore/Utilities/scripts/conddb @@ -1044,11 +1044,12 @@ def diffGlobalTagsAtRun_(args): if(args.testRunNumber<0): raise Exception("Run %s (default) can't be matched with an existing run in the database. \n\t\t Please specify a run with the option --run." % args.testRunNumber) - bestRun = session.query(RUNINFO.run_number, RUNINFO.start_time, RUNINFO.end_time).filter(RUNINFO.run_number == int(args.testRunNumber)).first() - if bestRun is None: - raise Exception("Run %s can't be matched with an existing run in the database." % args.testRunNumber) + if(int(args.testRunNumber)!=1): + bestRun = session.query(RUNINFO.run_number, RUNINFO.start_time, RUNINFO.end_time).filter(RUNINFO.run_number == int(args.testRunNumber)).first() + if bestRun is None: + raise Exception("Run %s can't be matched with an existing run in the database." % args.testRunNumber) - print("Run",args.testRunNumber," |Start time",bestRun[1]," |End time",bestRun[2],".") + print("Run",args.testRunNumber," |Start time",bestRun[1]," |End time",bestRun[2],".") #################################### # Get the Global Tag snapshots