attachment.is_patch is always None

Bug #299271 reported by Brian Murray
2
Affects Status Importance Assigned to Milestone
python-launchpad-bugs
New
Wishlist
Markus Korn

Bug Description

1) 166 of main
2)
bug = Bug(target)

if bug.attachments:
    for attachment in bug.attachments:
        print attachment.is_patch

Using bug 50169 as an example - attachment.is_patch is None for both attachments however one is flagged as a patch. Looking at html_bug.py it doesn't look like there is anything in the attachment parser that sets is_patch.

Changed in python-launchpad-bugs:
importance: Undecided → High
Markus Korn (thekorn)
Changed in python-launchpad-bugs:
assignee: nobody → thekorn
Revision history for this message
Markus Korn (thekorn) wrote :

This is_patch property of an attachment is supposed to be a kind of placeholder. The problem is that the main pages of a bugreport in html and text mode does not provide information about whether an attachment is a patch or not. The only way to find out about it is to check the checkbox on pages like [0].
I will try to fix this by adding a function for the html mode which parses the +edit page on request. this can't be fixed in text mode as the +text view does not provide the necessary data.

[0] https://bugs.edge.launchpad.net/ubuntu/+source/ubiquity/+bug/50169/attachments/13180

Revision history for this message
Brian Murray (brian-murray) wrote :

This information is also obtainable through the API via the type attribute of a bug_attachment.

Revision history for this message
Brian Murray (brian-murray) wrote :

I'm setting this to wishlist since it is a missing feature from python-launchpad-bugs and I've been using the API to gather this type of information.

Changed in python-launchpad-bugs:
importance: High → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.