From 2c7135a32fabf167f281dde87784e2ba1c30c57f Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Sat, 30 Sep 2017 13:52:05 -0500 Subject: [PATCH] exception handling for schedds --- python/jobSubmitter.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/python/jobSubmitter.py b/python/jobSubmitter.py index 13e338e..71784c9 100755 --- a/python/jobSubmitter.py +++ b/python/jobSubmitter.py @@ -298,10 +298,13 @@ def findRunning(self): else: coll = htcondor.Collector(collector) for sch in parser_dict["schedds"][cname].split(','): - scheddAd = coll.locate(htcondor.DaemonTypes.Schedd, sch) - schedd = htcondor.Schedd(scheddAd) - for result in schedd.xquery(constraint,["Out"]): - runSet.add(self.runningToJobName(result["Out"])) + try: + scheddAd = coll.locate(htcondor.DaemonTypes.Schedd, sch) + schedd = htcondor.Schedd(scheddAd) + for result in schedd.xquery(constraint,["Out"]): + runSet.add(self.runningToJobName(result["Out"])) + except: + print "Warning: could not locate schedd "+sch return runSet