From 85618dd6554548454ceadfa961e0431f5a9e2da7 Mon Sep 17 00:00:00 2001 From: Andrei Tsaregorodtsev Date: Wed, 17 Jan 2024 14:41:41 +0100 Subject: [PATCH] feat: make explicit error messages like permission denied --- src/DIRAC/Interfaces/scripts/dmeta.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/DIRAC/Interfaces/scripts/dmeta.py b/src/DIRAC/Interfaces/scripts/dmeta.py index cf47350d9de..971b900f9ef 100755 --- a/src/DIRAC/Interfaces/scripts/dmeta.py +++ b/src/DIRAC/Interfaces/scripts/dmeta.py @@ -40,6 +40,9 @@ def run(self, lfn, metas): result = self.fcClient.setMetadataBulk({lfn: metadict}) if not result["OK"]: print("Error:", result["Message"]) + if result["Value"]["Failed"]: + for ff in result["Value"]["Failed"]: + print("Error:", ff, result["Value"]["Failed"][ff]) class DMetaRm(DMetaCommand): @@ -50,6 +53,9 @@ def run(self, lfn, metas): result = self.fcClient.removeMetadata({lfn: metas}) if not result["OK"]: print("Error:", result["Message"]) + if result["Value"]["Failed"]: + for ff in result["Value"]["Failed"]: + print("Error:", ff, result["Value"]["Failed"][ff]) class DMetaList(DMetaCommand):