diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-11-11 12:45:40 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-11-11 16:42:21 +0100 |
commit | bad960e65f4d00315ea7c12cc00b84b26680eb9d (patch) | |
tree | 73e33b881a035562c7a6d4fd6472ad842c13c9e2 /bin/get-bugzilla-attachments-by-mimetype | |
parent | get-bugzilla-attachments-by-mimetype: add some missing mime types (diff) | |
download | core-bad960e65f4d00315ea7c12cc00b84b26680eb9d.tar.gz core-bad960e65f4d00315ea7c12cc00b84b26680eb9d.zip |
get-bugzilla-attachments-by-mimetype: better test for existing file
Change-Id: I208a74d11945986d0712970999dbd33c03efe488
Diffstat (limited to 'bin/get-bugzilla-attachments-by-mimetype')
-rwxr-xr-x | bin/get-bugzilla-attachments-by-mimetype | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/get-bugzilla-attachments-by-mimetype b/bin/get-bugzilla-attachments-by-mimetype index 4e588af59568..05a24e7cb26e 100755 --- a/bin/get-bugzilla-attachments-by-mimetype +++ b/bin/get-bugzilla-attachments-by-mimetype @@ -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()) |