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 28, 2024
1 parent 792c5c2 commit 9cebeb1
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 9cebeb1

Please sign in to comment.