S3Error should always be raised, regardless of the value of file_exists.
Bug reproducible when using get --continue while the target file exists.
The issue was recently introduced by commit 1a051563e.
Thanks @jamiew for noticing the issue.
... | ... |
@@ -446,7 +446,7 @@ def cmd_object_get(args): |
446 | 446 |
if not file_exists: # Delete, only if file didn't exist before! |
447 | 447 |
debug(u"object_get failed for '%s', deleting..." % (destination,)) |
448 | 448 |
os.unlink(destination) |
449 |
- raise |
|
449 |
+ raise |
|
450 | 450 |
|
451 | 451 |
if response["headers"].has_key("x-amz-meta-s3tools-gpgenc"): |
452 | 452 |
gpg_decrypt(destination, response["headers"]["x-amz-meta-s3tools-gpgenc"]) |