Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

cmd_sync_remote2remote crashes on connection error #113

Open
wants to merge 1 commit into from

2 participants

@KarneAsada

When syncing 2 buckets I got a fatal error. I found that cmd_sync_remote2remote wasn't handling the S3RequestError - so I added that to the except statement.

@mludvig
Owner

It would be better to retry in such a circumstance. Are you keen to implement it and re-submit? Thanks!

@KarneAsada

Sure, I'll see what I can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  s3cmd
View
2  s3cmd
@@ -653,7 +653,7 @@ def cmd_sync_remote2remote(args):
try:
response = s3.object_copy(src_uri, dst_uri, extra_headers)
output("File %(src)s copied to %(dst)s" % { "src" : src_uri, "dst" : dst_uri })
- except S3Error, e:
+ except (S3Error, S3RequestError), e:
error("File %(src)s could not be copied: %(e)s" % { "src" : src_uri, "e" : e })
total_elapsed = time.time() - timestamp_start
outstr = "Done. Copied %d files in %0.1f seconds, %0.2f files/s" % (seq, total_elapsed, seq/total_elapsed)
Something went wrong with that request. Please try again.