Skip to content

Commit

Permalink
do not go in error if it's run=1 (that's MC)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmusich committed Jul 9, 2021
1 parent de609d6 commit 2927fc9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions CondCore/Utilities/scripts/conddb
Expand Up @@ -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
Expand Down

0 comments on commit 2927fc9

Please sign in to comment.