Skip to content

Commit 47a7a88

Browse files
authored
Merge pull request #7879 from fstagni/cherry-pick-2-53c67a7db-integration
[sweep:integration] fix (FTSAgent): correct condition for return type
2 parents 8d138fc + 3b342a2 commit 47a7a88

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/DIRAC/DataManagementSystem/Agent/FTS3Agent.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,14 +291,15 @@ def _monitorJobCallback(returnedValue):
291291
:param returnedValue: value returned by the _monitorJob method
292292
(ftsJob, standard dirac return struct)
293293
"""
294-
if not isinstance(returnedValue, tuple) or len(returnedValue) != 2:
294+
if isinstance(returnedValue, tuple) and len(returnedValue) == 2:
295295
ftsJob, res = returnedValue
296296
log = gLogger.getLocalSubLogger(f"_monitorJobCallback/{ftsJob.jobID}")
297297
if not res["OK"]:
298298
log.error("Error updating job status", res)
299299
else:
300300
log.debug("Successfully updated job status")
301301
else:
302+
log = gLogger.getLocalSubLogger("_monitorJobCallback")
302303
log.error("Invalid return value when monitoring job", f"{returnedValue!r}")
303304

304305
def monitorJobsLoop(self):
@@ -385,6 +386,7 @@ def _treatOperationCallback(returnedValue):
385386
else:
386387
log.debug("Successfully treated operation")
387388
else:
389+
log = gLogger.getLocalSubLogger("_treatOperationCallback")
388390
log.error("Invalid return value when treating operation", f"{returnedValue!r}")
389391

390392
def _treatOperation(self, operation):

0 commit comments

Comments
 (0)