aboutsummaryrefslogtreecommitdiffstats
path: root/S3.py
diff options
context:
space:
mode:
Diffstat (limited to 'S3.py')
-rw-r--r--S3.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/S3.py b/S3.py
index a8c6f1f..7f40e37 100644
--- a/S3.py
+++ b/S3.py
@@ -277,7 +277,8 @@ class AWSAuthConnection:
277 except: 277 except:
278 # Sometimes the connection is reset by peer. If that happens 278 # Sometimes the connection is reset by peer. If that happens
279 # just try it again and we'll see what happens. 279 # just try it again and we'll see what happens.
280 connection.request(method, path, data, final_headers) 280 connection.close()
281 continue
281 282
282 resp = connection.getresponse() 283 resp = connection.getresponse()
283 if resp.status < 300 or resp.status >= 400: 284 if resp.status < 300 or resp.status >= 400:
@@ -297,6 +298,7 @@ class AWSAuthConnection:
297 if query: 298 if query:
298 path += "?" + query 299 path += "?" + query
299 # retry with redirect 300 # retry with redirect
301 connection.close()
300 302
301 def _add_aws_auth_header(self, headers, method, bucket, key, query_args): 303 def _add_aws_auth_header(self, headers, method, bucket, key, query_args):
302 if not headers.has_key('Date'): 304 if not headers.has_key('Date'):