Kaydet (Commit) bad960e6 authored tarafından Michael Stahl's avatar Michael Stahl

get-bugzilla-attachments-by-mimetype: better test for existing file

Change-Id: I208a74d11945986d0712970999dbd33c03efe488
üst 3e9d164a
......@@ -98,6 +98,11 @@ def get_novell_bug_via_xml(url, mimetype, prefix, suffix):
attachmentid += 1
download = suffix + '/' + prefix + id + '-' + str(attachmentid) + '.' + suffix
if os.path.isfile(download):
print("assuming " + download + " is up to date")
continue
realAttachmentId = match.group(1)
handle = urlopen_retry(novellattach + realAttachmentId)
if not handle:
......@@ -115,7 +120,6 @@ def get_novell_bug_via_xml(url, mimetype, prefix, suffix):
print("skipping")
continue
download = suffix + '/' + prefix + id + '-' + str(attachmentid) + '.' + suffix
print('downloading as ' + download)
f = open(download, 'wb')
f.write(handle.read())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment