RFE: add a bug.has_target() method

Bug #137434 reported by Markus Korn
2
Affects Status Importance Assigned to Milestone
python-launchpad-bugs
Fix Released
Wishlist
Unassigned

Bug Description

It would be nice to have a function to check if a bug has a task with a given target.
Improving this we should also fix Info.target as it seems to always return None.

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

This patch fixes Info.target and adds a Bug.has_target(<target>) method.
Example:
>>> b = Bug(88102)
>>> b.has_target("ubuntu")
True
>>> b.has_target(None) #(**)
True
>>> b.has_target("bla")
False

(**) .has_target(None) checks if there is a task without a target, means is targeted to upstream

Changed in python-launchpad-bugs:
status: New → Fix Committed
Revision history for this message
Daniel Holbach (dholbach) wrote :

Patch uploaded. Well done, Markus!

Changed in python-launchpad-bugs:
status: Fix Committed → Fix Released
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.