summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-09-05 17:50:24 +0200
committerDavid Tardon <dtardon@redhat.com>2014-09-05 21:37:45 +0200
commit9a8281bdeb9dad571de33fc83ad82ff62a94244e (patch)
treec32b9ce0a8eb590ac893abd05a0a731d15c7d13c /bin
parent0b4fba549ccf3ab92f2096d7b5e0961e5619158c (diff)
move the list of launchpad pkgs to a var.
Change-Id: Id8fed4516069e86b2fbee053e6681e145fdd4336
Diffstat (limited to 'bin')
-rwxr-xr-xbin/get-bugzilla-attachments-by-mimetype17
1 files changed, 14 insertions, 3 deletions
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"])