summaryrefslogtreecommitdiff
path: root/linaro-cp.py
diff options
context:
space:
mode:
Diffstat (limited to 'linaro-cp.py')
-rwxr-xr-xlinaro-cp.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/linaro-cp.py b/linaro-cp.py
index 43f9aaa..e147685 100755
--- a/linaro-cp.py
+++ b/linaro-cp.py
@@ -182,11 +182,11 @@ class API_v3(API_v1):
else:
return repr(e)
code = c.getinfo(pycurl.RESPONSE_CODE)
- if code == 503 and retry_count > 0:
- print('503 failure for %s, retrying in 2 seconds' % url)
+ if code not in (200, 201):
+ if retry_count > 0:
+ print('%d failure for %s, retrying in 2 seconds' % (code, url))
time.sleep(2)
return self._put_s3(url, filename, mtype, retry_count - 1)
- if code not in (200, 201):
return response.getvalue()
def upload_file(self, url, filename):