Skip to content

Commit

Permalink
sweep: DIRACGrid#7465 dmeta - Error message in case failure due to pe…
Browse files Browse the repository at this point in the history
…rmission denied
  • Loading branch information
atsareg authored and fstagni committed Feb 14, 2024
1 parent ac13e55 commit 2a5df45
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/DIRAC/Interfaces/scripts/dmeta.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ def run(self, lfn, metas):
result = self.fcClient.setMetadataBulk({lfn: metadict})
if not result["OK"]:
gLogger.error(result["Message"])
if result["Value"]["Failed"]:
for ff in result["Value"]["Failed"]:
print("Error:", ff, result["Value"]["Failed"][ff])


class DMetaRm(DMetaCommand):
Expand All @@ -50,6 +53,9 @@ def run(self, lfn, metas):
result = self.fcClient.removeMetadata({lfn: metas})
if not result["OK"]:
gLogger.error(result["Message"])
if result["Value"]["Failed"]:
for ff in result["Value"]["Failed"]:
print("Error:", ff, result["Value"]["Failed"][ff])


class DMetaList(DMetaCommand):
Expand Down

0 comments on commit 2a5df45

Please sign in to comment.