On 17-04-2012 10:44, Thorsten Behrens wrote:
Hi Gökçen,
Hello,
thanks a lot, nice improvement - pushed
While testing KDE bugzilla I noticed a bug. This patch fixes that, can
you push this one as well?
Cheers.
-- Thorsten
--
Gökçen Eraslan
From b048d701420a107d9f62f0edae095d61efd20416 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=B6k=C3=A7en=20Eraslan?= <gokcen.eraslan@gmail.com>
Date: Tue, 17 Apr 2012 12:04:05 +0300
Subject: [PATCH] Fix handling of deleted bugzilla attachments
As in https://bugs.kde.org/show_bug.cgi?ctype=xml&id=53343 <data>
tag may not have a value if the attachment is deleted.
---
bin/get-bugzilla-attachments-by-mimetype | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/bin/get-bugzilla-attachments-by-mimetype b/bin/get-bugzilla-attachments-by-mimetype
index b9488b9..7c77957 100755
--- a/bin/get-bugzilla-attachments-by-mimetype
+++ b/bin/get-bugzilla-attachments-by-mimetype
@@ -77,6 +77,11 @@ def get_from_bug_url_via_xml(url, mimetype, prefix, suffix):
print 'skipping'
break
elif node.nodeName == 'data':
+ # check if attachment is deleted (i.e.
https://bugs.kde.org/show_bug.cgi?id=53343&ctype=xml)
+ if not node.firstChild:
+ print 'deleted attachment, skipping'
+ continue
+
download = suffix + '/' +prefix + id + '-' + str(attachmentid) + '.' + suffix
print 'downloading as', download
f = open(download, 'w')
--
1.7.10
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.