diff --git a/src/DIRAC/DataManagementSystem/Client/FTS3Job.py b/src/DIRAC/DataManagementSystem/Client/FTS3Job.py index 2201e3c6b83..e0a2e9cee27 100644 --- a/src/DIRAC/DataManagementSystem/Client/FTS3Job.py +++ b/src/DIRAC/DataManagementSystem/Client/FTS3Job.py @@ -296,7 +296,7 @@ def __seTokenSupport(seName, vo): """ return StorageElement(seName, vo=vo).options.get("TokenSupport", "").lower() in ("true", "yes") - def _constructTransferJob(self, pinTime, allLFNs, target_spacetoken, protocols=None, useToken=False): + def _constructTransferJob(self, pinTime, allLFNs, target_spacetoken, protocols=None, useTokens=False): """Build a job for transfer Some attributes of the job are expected to be set @@ -324,7 +324,7 @@ def _constructTransferJob(self, pinTime, allLFNs, target_spacetoken, protocols=N log = gLogger.getSubLogger(f"constructTransferJob/{self.operationID}/{self.sourceSE}_{self.targetSE}") isMultiHop = False - useToken = False + useTokens = False # Check if it is a multiHop transfer if self.multiHopSE: @@ -486,7 +486,7 @@ def _constructTransferJob(self, pinTime, allLFNs, target_spacetoken, protocols=N # Add tokens if both storages support it and if the requested if ( - useToken + useTokens and self.__seTokenSupport(hopSrcSEName, self.vo) and self.__seTokenSupport(hopDstSEName, self.vo) ): @@ -515,7 +515,7 @@ def _constructTransferJob(self, pinTime, allLFNs, target_spacetoken, protocols=N if not res["OK"]: return res dstToken = res["Value"]["access_token"] - useToken = True + useTokens = True # because of an xroot bug (https://github.com/xrootd/xrootd/issues/1433) # the checksum needs to be lowercase. It does not impact the other @@ -548,7 +548,7 @@ def _constructTransferJob(self, pinTime, allLFNs, target_spacetoken, protocols=N "rmsReqID": self.rmsReqID, "sourceSE": self.sourceSE, "targetSE": self.targetSE, - "useToken": useToken, + "useTokens": useTokens, } if self.activity: @@ -748,7 +748,7 @@ def submit(self, context=None, ftsServer=None, ucert=None, pinTime=36000, protoc if self.type == "Transfer": res = self._constructTransferJob( - pinTime, allLFNs, target_spacetoken, protocols=protocols, useToken=bool(fts_access_token) + pinTime, allLFNs, target_spacetoken, protocols=protocols, useTokens=bool(fts_access_token) ) elif self.type == "Staging": res = self._constructStagingJob(pinTime, allLFNs, target_spacetoken)