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>
This commit is contained in:
Caolán McNamara
2019-04-19 12:55:28 +01:00
parent bb26b7577a
commit a91deee9ee

View File

@@ -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')