Commit 4c479385 authored by Sebastien Ponce's avatar Sebastien Ponce
Browse files

added a check for empty list of sources, although it should not happen

parent 4adf8d98
......@@ -403,6 +403,12 @@ class D2DDispatcherThread(AbstractDispatcherThread):
def _scheduleD2d(self, srcTransfer, sourceFileSystems, destFilesystems):
'''Schedules a disk to disk copy on the source and destinations and handle issues '''
# check whether the sources are not empty
if sourceFileSystems == None:
# fail the transfer immediately as we have nowhere to go. This will log the error too
self.updateDBQueue.put((srcTransfer.transferId, srcTransfer.fileId, 1721, # 1721 = ESTSCHEDERR
'No source found', srcTransfer.reqId))
return
# check whether the destinations are not empty
if destFilesystems == None:
# fail the transfer immediately as we have nowhere to go. This will log the error too
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment