From 9a8281bdeb9dad571de33fc83ad82ff62a94244e Mon Sep 17 00:00:00 2001 From: David Tardon Date: Fri, 5 Sep 2014 17:50:24 +0200 Subject: move the list of launchpad pkgs to a var. Change-Id: Id8fed4516069e86b2fbee053e6681e145fdd4336 --- bin/get-bugzilla-attachments-by-mimetype | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/get-bugzilla-attachments-by-mimetype b/bin/get-bugzilla-attachments-by-mimetype index ef44dbd2caaa..0600ac5bceb9 100755 --- a/bin/get-bugzilla-attachments-by-mimetype +++ b/bin/get-bugzilla-attachments-by-mimetype @@ -239,6 +239,19 @@ def get_through_rss_query(queryurl, mimetype, prefix, suffix): print('looking for all bugs having %s attachment(s)' % mimetype) 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): #launchpadlib python module is required to download launchpad attachments from launchpadlib.launchpad import Launchpad @@ -246,9 +259,7 @@ def get_launchpad_bugs(prefix): launchpad = Launchpad.login_anonymously("attachmentdownload", "production") ubuntu = launchpad.distributions["ubuntu"] - #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 - for pkg in ["libreoffice", "openoffice.org", "abiword", "gnumeric", "koffice", "calligra", "inkscape", "sk1"]: + for pkg in launchpad_pkgs: 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"]) -- cgit