Skip to content

Commit

Permalink
do not go in error is 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 588e78b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions CondCore/Utilities/python/tier0.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ def _queryTier0DataSvc( self, url ):
msg = "curl returned ok upon the second try"
logging.info(msg)

return json.loads( ''.join(stdoutdata).replace( "'", '"').replace(' None', ' "None"') )

return json.loads( ''.join(stdoutdata).replace( "'", '"').replace(' None', ' "None"') )

def getFirstSafeRun( self ):
"""
Expand Down
10 changes: 5 additions & 5 deletions CondCore/Utilities/scripts/conddb
Original file line number Diff line number Diff line change
Expand Up @@ -1040,15 +1040,15 @@ def diffGlobalTagsAtRun_(args):
####################################

if(not args.lastIOV):

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 588e78b

Please sign in to comment.