Skip to content

Commit

Permalink
feat: make explicit error messages like permission denied
Browse files Browse the repository at this point in the history
  • Loading branch information
atsareg committed Feb 11, 2024
1 parent 539bdc9 commit 85618dd
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"]:
print("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"]:
print("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 85618dd

Please sign in to comment.