Skip to content

Commit

Permalink
fix: do not get double entries
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni committed Aug 30, 2024
1 parent 47841f6 commit 7d0d266
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/DIRAC/Core/LCG/GOCDBClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,11 @@ def _downTimeXMLParsing(self, dt, siteOrRes, entities=None, startDateMax=None):

try:
dtDict[str(dtElement.getAttributeNode("PRIMARY_KEY").nodeValue) + " " + elements["ENDPOINT"]] = elements
dtDict[str(dtElement.getAttributeNode("PRIMARY_KEY").nodeValue) + " " + elements["ENDPOINT"]][
"URL"
] = urls[0]
except Exception:
if urls:
dtDict[str(dtElement.getAttributeNode("PRIMARY_KEY").nodeValue) + " " + elements["ENDPOINT"]][
"URL"
] = urls[0]
except Exception as e:
try:
dtDict[
str(dtElement.getAttributeNode("PRIMARY_KEY").nodeValue) + " " + elements["HOSTNAME"]
Expand Down

0 comments on commit 7d0d266

Please sign in to comment.