Skip to content

Commit da574c3

Browse files
committed
fix (ReplicateAndRegister): better error reporting for files with no replicas
1 parent 2113fec commit da574c3

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -430,10 +430,16 @@ def fts3Transfer(self):
430430
)
431431
opFile.Error = "Couldn't get metadata"
432432
elif noReplicas:
433-
self.log.error(
434-
"Unable to schedule transfer",
435-
f"File {opFile.LFN} doesn't exist at {','.join(noReplicas)}",
436-
)
433+
if None in noReplicas:
434+
self.log.error(
435+
"Unable to schedule transfer",
436+
f"File {opFile.LFN} doesn't have any replicas, which should never happen",
437+
)
438+
else:
439+
self.log.error(
440+
"Unable to schedule transfer",
441+
f"File {opFile.LFN} doesn't exist at {','.join(noReplicas)}",
442+
)
437443
opFile.Error = "No replicas found"
438444
opFile.Status = "Failed"
439445
elif badReplicas:

0 commit comments

Comments
 (0)