Skip to content

Commit

Permalink
fix(TCA): all messaging done in submitRemovalRequest function
Browse files Browse the repository at this point in the history
Fixes error trying to access empty Value in res
  • Loading branch information
andresailer committed Oct 12, 2023
1 parent 0119413 commit d396621
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -553,16 +553,7 @@ def cleanMetadataCatalogFiles(self, transID):
self.log.info("No files found for transID", transID)
return S_OK()

res = self.__submitRemovalRequests(fileToRemove, transID)

if not res["OK"]:
return res
for lfn, reason in res["Value"]["Failed"].items():
self.log.error("Failed to remove file found in metadata catalog", f"{lfn} {reason}")
if res["Value"]["Failed"]:
return S_ERROR("Failed to remove all files found in the metadata catalog")
self.log.info("Successfully removed all files found in the DFC")
return S_OK()
return self.__submitRemovalRequests(fileToRemove, transID)

#############################################################################
#
Expand Down

0 comments on commit d396621

Please sign in to comment.