Kaydet (Commit) 9a8281bd authored tarafından David Tardon's avatar David Tardon

move the list of launchpad pkgs to a var.

Change-Id: Id8fed4516069e86b2fbee053e6681e145fdd4336
üst 0b4fba54
...@@ -239,6 +239,19 @@ def get_through_rss_query(queryurl, mimetype, prefix, suffix): ...@@ -239,6 +239,19 @@ def get_through_rss_query(queryurl, mimetype, prefix, suffix):
print('looking for all bugs having %s attachment(s)' % mimetype) print('looking for all bugs having %s attachment(s)' % mimetype)
process(query, True, get_file_bz_ids(files, prefix)) process(query, True, get_file_bz_ids(files, prefix))
#since searching bugs having attachments with specific mimetypes is not available in launchpad API
#we're iterating over all bugs of the most interesting source packages
launchpad_pkgs = (
"abiword",
"calligra",
"gnumeric",
"inkscape",
"koffice",
"libreoffice",
"openoffice.org",
"sk1",
)
def get_launchpad_bugs(prefix): def get_launchpad_bugs(prefix):
#launchpadlib python module is required to download launchpad attachments #launchpadlib python module is required to download launchpad attachments
from launchpadlib.launchpad import Launchpad from launchpadlib.launchpad import Launchpad
...@@ -246,9 +259,7 @@ def get_launchpad_bugs(prefix): ...@@ -246,9 +259,7 @@ def get_launchpad_bugs(prefix):
launchpad = Launchpad.login_anonymously("attachmentdownload", "production") launchpad = Launchpad.login_anonymously("attachmentdownload", "production")
ubuntu = launchpad.distributions["ubuntu"] ubuntu = launchpad.distributions["ubuntu"]
#since searching bugs having attachments with specific mimetypes is not available in launchpad API for pkg in launchpad_pkgs:
#we're iterating over all bugs of the most interesting source packages
for pkg in ["libreoffice", "openoffice.org", "abiword", "gnumeric", "koffice", "calligra", "inkscape", "sk1"]:
srcpkg = ubuntu.getSourcePackage(name=pkg) srcpkg = ubuntu.getSourcePackage(name=pkg)
pkgbugs = srcpkg.searchTasks(status=["New", "Fix Committed", "Invalid", "Won't Fix", "Confirmed", "Triaged", "In Progress", "Incomplete", "Incomplete (with response)", "Incomplete (without response)", "Fix Released", "Opinion", "Expired"]) pkgbugs = srcpkg.searchTasks(status=["New", "Fix Committed", "Invalid", "Won't Fix", "Confirmed", "Triaged", "In Progress", "Incomplete", "Incomplete (with response)", "Incomplete (without response)", "Fix Released", "Opinion", "Expired"])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment