summaryrefslogtreecommitdiff
path: root/bin/get-bugzilla-attachments-by-mimetype
diff options
context:
space:
mode:
Diffstat (limited to 'bin/get-bugzilla-attachments-by-mimetype')
-rwxr-xr-xbin/get-bugzilla-attachments-by-mimetype5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/get-bugzilla-attachments-by-mimetype b/bin/get-bugzilla-attachments-by-mimetype
index b9488b94806f..7c779579e6a4 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')