Skip to content

Commit

Permalink
use classad.paraseAds - fix dmwm#8285
Browse files Browse the repository at this point in the history
  • Loading branch information
belforte committed Mar 18, 2024
1 parent f6a5963 commit ae9783e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/python/ServerUtilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def parseJobAd(filename):
"""
jobAd = {}
with open(filename) as fd:
# classad.parseOld(fd)
# classad.parseAds(fd)
for adline in fd.readlines():
info = adline.split(' = ', 1)
if len(info) != 2:
Expand Down
2 changes: 1 addition & 1 deletion src/python/TaskWorker/Actions/DagmanCreator.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ def createSubdag(self, splitterResult, **kwargs):
siteinfo = {'group_sites': {}, 'group_datasites': {}}
if os.path.exists("site.ad"):
with open("site.ad", encoding='utf-8') as fd:
sitead = classad.parse(fd)
sitead = classad.parseAds(fd)
else:
sitead = classad.ClassAd()

Expand Down
4 changes: 2 additions & 2 deletions src/python/TaskWorker/Actions/RetryJob.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def get_job_ad_from_condor_q(self):

for text_ad in output.split("\n\n"):
try:
ad = classad.parseOld(text_ad)
ad = classad.parseAds(text_ad)
except SyntaxError:
continue
if ad:
Expand All @@ -105,7 +105,7 @@ def get_job_ad_from_file(self):
if os.path.isfile(job_ad_file):
try:
with open(job_ad_file, encoding='utf-8') as fd:
ad = classad.parseOld(fd)
ad = classad.parseAds(fd)
except Exception: # pylint: disable=broad-except
msg = "Unable to parse classads from file %s. Continuing." % (job_ad_file)
self.logger.warning(msg)
Expand Down
2 changes: 1 addition & 1 deletion src/python/TaskWorker/TaskManagerBootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def bootstrap():
adfile = os.environ["_CONDOR_JOB_AD"]
print("Parsing classad")
with open(adfile, "r") as fd:
ad = classad.parseOld(fd)
ad = classad.parseAds(fd)
print("..done")
in_args = []
if infile != "None":
Expand Down

0 comments on commit ae9783e

Please sign in to comment.