Skip to content

Commit 3fde432

Browse files
chaenweb-flow
authored andcommitted
sweep: #5947 [v7r3]fix (RequestTask): fix error referenced before assignment
1 parent 3a510bc commit 3fde432

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,8 @@ def __call__(self):
403403
if operation.Status != "Failed":
404404
operation.Status = "Failed"
405405
self.request.Error = "Job no longer exists"
406-
except Exception as error:
406+
except Exception as e:
407+
error = str(e)
407408
self.log.exception("hit by exception:", "%s" % error)
408409
if pluginName:
409410
if self.rmsMonitoring:

0 commit comments

Comments
 (0)