summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-11-11 12:45:40 +0100
committerMichael Stahl <mstahl@redhat.com>2013-11-11 16:42:21 +0100
commitbad960e65f4d00315ea7c12cc00b84b26680eb9d (patch)
tree73e33b881a035562c7a6d4fd6472ad842c13c9e2 /bin
parent3e9d164a06d60e756dffad4dd18795796348e97e (diff)
get-bugzilla-attachments-by-mimetype: better test for existing file
Change-Id: I208a74d11945986d0712970999dbd33c03efe488
Diffstat (limited to 'bin')
-rwxr-xr-xbin/get-bugzilla-attachments-by-mimetype6
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())