From 9e135f46f346eb4a8d7814729640ab4ed96c18ba Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Fri, 5 May 2017 18:39:13 +0100 Subject: [PATCH] bug: add method to retreive all metadata for attachments not just ids --- bugzilla/bug.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bugzilla/bug.py b/bugzilla/bug.py index 2208989a..ddccbcc4 100644 --- a/bugzilla/bug.py +++ b/bugzilla/bug.py @@ -357,7 +357,7 @@ def updateflags(self, flags): # Experimental methods # ######################## - def get_attachment_ids(self): + def get_attachments_metadata (self): # pylint: disable=protected-access proxy = self.bugzilla._proxy # pylint: enable=protected-access @@ -369,7 +369,10 @@ def get_attachment_ids(self): {"ids": [self.bug_id], "exclude_fields": ["data"]}) attachments = rawret["bugs"][str(self.bug_id)] - return [a["id"] for a in attachments] + return attachments + + def get_attachment_ids(self): + return [a["id"] for a in self.get_attachments_metadata()] def get_history_raw(self): '''