diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-02-09 12:55:53 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-02-13 00:25:02 +0100 |
commit | 66fa9be298149f9db2051adf693f84ae92d3af6d (patch) | |
tree | bc17fd7c3f2d35ea89b54475e10fa3586d1ff6e1 /bin/get-bugzilla-attachments-by-mimetype | |
parent | get-bugzilla-attachments-by-mimetype: fix it (diff) | |
download | core-66fa9be298149f9db2051adf693f84ae92d3af6d.tar.gz core-66fa9be298149f9db2051adf693f84ae92d3af6d.zip |
get-bugzilla-attachments-by-mimetype: deduplicate
Diffstat (limited to 'bin/get-bugzilla-attachments-by-mimetype')
-rwxr-xr-x | bin/get-bugzilla-attachments-by-mimetype | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/bin/get-bugzilla-attachments-by-mimetype b/bin/get-bugzilla-attachments-by-mimetype index f6dba152492f..c26ec84cec2d 100755 --- a/bin/get-bugzilla-attachments-by-mimetype +++ b/bin/get-bugzilla-attachments-by-mimetype @@ -114,25 +114,24 @@ redhatbug = 'https://bugzilla.redhat.com/show_bug.cgi?id=' novell = 'https://bugzilla.novell.com/buglist.cgi' mozilla = 'https://bugzilla.mozilla.org/buglist.cgi' -get_through_rss_query(freedesktop, 'application/msword', "fdo", "doc") -get_through_rss_query(freedesktop, 'application/rtf', "fdo", "rtf") -get_through_rss_query(freedesktop, 'text/rtf', "fdo", "rtf") -get_through_rss_query(freedesktop, 'text/spreadsheet', "fdo", "slk") -get_through_rss_query(freedesktop, 'application/vnd.ms-powerpoint', "fdo", "ppt") +mimetypes = [ + ('application/msword', 'doc'), + ('application/rtf', 'rtf'), + ('text/rtf', 'rtf'), + ('text/spreadsheet', 'slk'), + ('application/vnd.ms-powerpoint', 'ppt'), +] -get_through_rpc_query(redhatrpc, redhatbug, 'application/msword', "rhbz", "doc") -get_through_rpc_query(redhatrpc, redhatbug, 'application/rtf', "rhbz", "rtf") -get_through_rpc_query(redhatrpc, redhatbug, 'text/rtf', "rhbz", "rtf") -get_through_rpc_query(redhatrpc, redhatbug, 'text/spreadsheet', "rhbz", "slk") -get_through_rpc_query(redhatrpc, redhatbug, 'application/vnd.ms-powerpoint', "rhbz", "ppt") +for (mimetype,extension) in mimetypes: + get_through_rss_query(freedesktop, mimetype, "fdo", extension) + +for (mimetype,extension) in mimetypes: + get_through_rpc_query(redhatrpc, redhatbug, mimetype, "rhbz", extension) #to-do, get attachments some other way, not inline in xml #get_through_rss_query(novell, 'application/msword', "n", "doc") -get_through_rss_query(openoffice, 'application/msword', "ooo", "doc") -get_through_rss_query(openoffice, 'application/rtf', "ooo", "rtf") -get_through_rss_query(openoffice, 'text/rtf', "ooo", "rtf") -get_through_rss_query(openoffice, 'text/spreadsheet', "ooo", "slk") -get_through_rss_query(openoffice, 'application/vnd.ms-powerpoint', "ooo", "ppt") +for (mimetype,extension) in mimetypes: + get_through_rss_query(openoffice, mimetype, "ooo", extension) # vim:set shiftwidth=4 softtabstop=4 expandtab: |