BugList
This is still work in progress
Example usage of BugList
Usage of LaunchpadConnector and setting authentification: {{{ import launchpadBugs.Connector as Connector
BugList = Connector.ConnectBugList() BugList.authentification = "cookie.txt" }}}
Getting a list of bugs and print available information: {{{ l = bl.BugList("https://bugs.launchpad.net/ubuntu/+source/bughelper/+bugs") for i in l.bugs:
- print i.bugnumber, print i.url, print i.summary, print i.importance, print i.status, print i.sourcepackage
}}}
Adding some (upstream) bugs to the set {{{ l += bl.BugList("https://bugs.launchpad.net/bughelper/+bugs") print l.bugs }}}
Setting a filter and filter the set of bugs {{{ bl.set_filter(minbug=100000, filterbug="117701,109628", status="New") l = l.filter() print l.bugs }}}
add LP urloptions to an url {{{ a = bl.BugList("https://launchpad.net/ubuntu/+source/apport/+bugs?%s" %bl.URLOPT) print a.bugs }}}
Sorting the list of bugs {{{ print l.sort("nr") }}}
Raising LPUrlError for invalid urls {{{ try:
a = bl.BugList("https://bugs.launchpad.net/ubuntu/+source/firefokkksss/+bugs") print len(a.bugs)
except bl.LPURLERROR, e:
- print e
}}}