def __attachment_bugs_cb()

in libmozdata/bugzilla.py [0:0]


    def __attachment_bugs_cb(self, res, *args, **kwargs):
        """Callback for bug attachment

        Args:
            sess: session
            res: result
        """
        if res.status_code == 200:
            json = res.json()
            if "bugs" in json:
                bugs = json["bugs"]
                if bugs:
                    for key in bugs.keys():
                        if isinstance(key, six.string_types) and key.isdigit():
                            attachments = bugs[key]
                            self.attachmenthandler.handle(attachments, key)
        elif self.RAISE_ERROR:
            res.raise_for_status()