Skip to content

Commit

Permalink
more exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
kpedro88 committed Oct 2, 2017
1 parent 2c7135a commit 629c622
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
5 changes: 2 additions & 3 deletions python/.prodconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
fnal = cmssrv208.fnal.gov,cmssrv223.fnal.gov
cmscon = login.uscms.org
[schedds]
fnal = cmslpc23.fnal.gov,cmslpc24.fnal.gov,cmslpc25.fnal.gov,cmslpc26.fnal.gov,cmslpc27.fnal.gov,cmslpc28.fnal.gov,cmslpc29.fnal.gov,cmslpc30.fnal.gov,cmslpc31.fnal.gov,cmslpc32.fnal.gov,cmslpc33.fnal.gov,cmslpc34.fnal.gov,cmslpc35.fnal.gov,cmslpc36.fnal.gov,cmslpc38.fnal.gov,cmslpc39.fnal.gov,cmslpc41.fnal.gov,cmslpc42.fnal.gov
#,cmslpc37.fnal.gov
fnal = cmslpc23.fnal.gov,cmslpc24.fnal.gov,cmslpc25.fnal.gov,cmslpc26.fnal.gov,cmslpc27.fnal.gov,cmslpc28.fnal.gov,cmslpc29.fnal.gov,cmslpc30.fnal.gov,cmslpc31.fnal.gov,cmslpc32.fnal.gov,cmslpc33.fnal.gov,cmslpc34.fnal.gov,cmslpc35.fnal.gov,cmslpc36.fnal.gov,cmslpc37.fnal.gov,cmslpc38.fnal.gov,cmslpc39.fnal.gov,cmslpc41.fnal.gov,cmslpc42.fnal.gov
cmscon = login.uscms.org
[caches]
$CMSSW_BASE/tmp = 1
$CMSSW_BASE/tmp = 1
12 changes: 8 additions & 4 deletions python/manageJobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,14 @@ def getJobs(options, scheddurl=""):
elif options.idle: constraint += ' && JobStatus==1'

if len(scheddurl)>0:
if len(options.coll)>0: coll = htcondor.Collector(options.coll)
else: coll = htcondor.Collector() # defaults to local
scheddAd = coll.locate(htcondor.DaemonTypes.Schedd, scheddurl)
schedd = htcondor.Schedd(scheddAd)
try:
if len(options.coll)>0: coll = htcondor.Collector(options.coll)
else: coll = htcondor.Collector() # defaults to local
scheddAd = coll.locate(htcondor.DaemonTypes.Schedd, scheddurl)
schedd = htcondor.Schedd(scheddAd)
except:
print "Warning: could not locate schedd "+scheddurl
return []
else:
schedd = htcondor.Schedd() # defaults to local

Expand Down

0 comments on commit 629c622

Please sign in to comment.