Skip to content

Commit 336f598

Browse files
authored
Merge pull request #5951 from DIRACGridBot/cherry-pick-2-428aead7b-integration
[sweep:integration] [v7r3]fix (RequestTask): fix error referenced before assignment
2 parents df3f396 + 20e0a54 commit 336f598

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/DIRAC/DataManagementSystem/Agent/RequestOperations/RegisterFile.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,13 @@ def __call__(self):
8989
# # get LFN
9090
lfn = opFile.LFN
9191
# # and others
92-
fileTuple = (lfn, opFile.PFN, opFile.Size, self.operation.targetSEList[0], opFile.GUID, opFile.Checksum)
92+
93+
# CHRIS: for whatever reason, we only take the first one
94+
targetSE = ""
95+
if self.operation.targetSEList:
96+
targetSE = self.operation.targetSEList[0]
97+
98+
fileTuple = (lfn, opFile.PFN, opFile.Size, targetSE, opFile.GUID, opFile.Checksum)
9399
# # call DataManager
94100
registerFile = dm.registerFile(fileTuple)
95101
# # check results

src/DIRAC/RequestManagementSystem/private/RequestTask.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ def __call__(self):
404404
operation.Status = "Failed"
405405
self.request.Error = "Job no longer exists"
406406
except Exception as error:
407-
self.log.exception("hit by exception:", "%s" % error)
407+
self.log.exception("hit by exception:", error)
408408
if pluginName:
409409
if self.rmsMonitoring:
410410
self.rmsMonitoringReporter.addRecord(

0 commit comments

Comments
 (0)