summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-04-19 12:55:28 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-04-19 14:50:55 +0200
commita91deee9ee7bb20b2a79efea51d3a7998283983e (patch)
treea9a05480a79435937a8d0bc405ad4227e7df5d03 /bin
parentbb26b7577a30978ff207e7de88eb2c58549f9a60 (diff)
node.firstChild seen as None
Change-Id: Ic4d2538f15d6246d81fabe8347a8be157b69deb3 Reviewed-on: https://gerrit.libreoffice.org/70979 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'bin')
-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 5d6227996cb8..a704b5461d67 100755
--- a/bin/get-bugzilla-attachments-by-mimetype
+++ b/bin/get-bugzilla-attachments-by-mimetype
@@ -71,6 +71,11 @@ def get_from_bug_url_via_xml(url, mimetype, prefix, suffix):
print(" mimetype is", end=' ')
for node in attachment.childNodes:
if node.nodeName == 'type':
+ # check if attachment is deleted
+ if not node.firstChild:
+ print('deleted attachment, skipping')
+ continue
+
print(node.firstChild.nodeValue, end=' ')
if node.firstChild.nodeValue.lower() != mimetype.lower():
print('skipping')