From 76aa85c7881c3a73b9891690d51e2c1dc6438758 Mon Sep 17 00:00:00 2001 From: Christophe Haen Date: Fri, 5 Jul 2024 09:55:47 +0200 Subject: [PATCH] sweep: #7653 Remove dead code path in ReplicateAndRegister --- .../Agent/RequestOperations/ReplicateAndRegister.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/DIRAC/DataManagementSystem/Agent/RequestOperations/ReplicateAndRegister.py b/src/DIRAC/DataManagementSystem/Agent/RequestOperations/ReplicateAndRegister.py index 6bcd801ee95..a7860b11a2c 100644 --- a/src/DIRAC/DataManagementSystem/Agent/RequestOperations/ReplicateAndRegister.py +++ b/src/DIRAC/DataManagementSystem/Agent/RequestOperations/ReplicateAndRegister.py @@ -599,13 +599,6 @@ def dmTransfer(self, fromFTS=False): # All source SEs are banned, delay execution by 1 hour delayExecution = 60 continue - # # get the first one in the list - if sourceSE not in validReplicas: - if sourceSE: - err = "File not at specified source" - errors[err] += 1 - self.log.warn(f"{lfn} is not at specified sourceSE {sourceSE}, changed to {validReplicas[0]}") - sourceSE = validReplicas[0] # # loop over targetSE catalogs = self.operation.Catalog @@ -617,6 +610,7 @@ def dmTransfer(self, fromFTS=False): if targetSE in validReplicas: self.log.warn(f"Request to replicate {lfn} to an existing location: {targetSE}") continue + sourceSE = self.operation.SourceSE if self.operation.SourceSE else None res = self.dm.replicateAndRegister(lfn, targetSE, sourceSE=sourceSE, catalog=catalogs) if res["OK"]: if lfn in res["Value"]["Successful"]: