{"action":"created","issue":{"url":"https://api.github.com/repos/s3tools/s3cmd/issues/502","labels_url":"https://api.github.com/repos/s3tools/s3cmd/issues/502/labels{/name}","comments_url":"https://api.github.com/repos/s3tools/s3cmd/issues/502/comments","events_url":"https://api.github.com/repos/s3tools/s3cmd/issues/502/events","html_url":"https://github.com/s3tools/s3cmd/pull/502","id":62289231,"number":502,"title":"Catch get_bucket_location IOError in send_file","user":{"login":"karlvr","id":1086005,"avatar_url":"https://avatars.githubusercontent.com/u/1086005?v=3","gravatar_id":"","url":"https://api.github.com/users/karlvr","html_url":"https://github.com/karlvr","followers_url":"https://api.github.com/users/karlvr/followers","following_url":"https://api.github.com/users/karlvr/following{/other_user}","gists_url":"https://api.github.com/users/karlvr/gists{/gist_id}","starred_url":"https://api.github.com/users/karlvr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlvr/subscriptions","organizations_url":"https://api.github.com/users/karlvr/orgs","repos_url":"https://api.github.com/users/karlvr/repos","events_url":"https://api.github.com/users/karlvr/events{/privacy}","received_events_url":"https://api.github.com/users/karlvr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-17T05:16:37Z","updated_at":"2015-03-17T19:19:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/s3tools/s3cmd/pulls/502","html_url":"https://github.com/s3tools/s3cmd/pull/502","diff_url":"https://github.com/s3tools/s3cmd/pull/502.diff","patch_url":"https://github.com/s3tools/s3cmd/pull/502.patch"},"body":"I frequently see a broken pipe, which I tracked down to get_bucket_location. This seems to happen on big syncs, where there are lots of files to compare - maybe the connection is being dropped?\r\n\r\nBorrowing the retry code from the try block below, this simply retries the same send_file, which appears to solve the problem.\r\n\r\n(Confession: this is the first Python I've edited / written so all feedback received gladly and I'll happily tidy up / modify, hand-over or rewrite this)"},"comment":{"url":"https://api.github.com/repos/s3tools/s3cmd/issues/comments/82549065","html_url":"https://github.com/s3tools/s3cmd/pull/502#issuecomment-82549065","issue_url":"https://api.github.com/repos/s3tools/s3cmd/issues/502","id":82549065,"user":{"login":"mdomsch","id":689066,"avatar_url":"https://avatars.githubusercontent.com/u/689066?v=3","gravatar_id":"","url":"https://api.github.com/users/mdomsch","html_url":"https://github.com/mdomsch","followers_url":"https://api.github.com/users/mdomsch/followers","following_url":"https://api.github.com/users/mdomsch/following{/other_user}","gists_url":"https://api.github.com/users/mdomsch/gists{/gist_id}","starred_url":"https://api.github.com/users/mdomsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdomsch/subscriptions","organizations_url":"https://api.github.com/users/mdomsch/orgs","repos_url":"https://api.github.com/users/mdomsch/repos","events_url":"https://api.github.com/users/mdomsch/events{/privacy}","received_events_url":"https://api.github.com/users/mdomsch/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T19:19:35Z","updated_at":"2015-03-17T19:19:35Z","body":"this isn't quite right, but if you can frequently get a broken pipe message, please try with https://github.com/mdomsch/s3cmd/tree/bug/epipe-2 branch and see if that addresses it correctly.  The retry logic needs to be done at a lower level than where you put it in your patch.\r\n\r\n"}}