summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Copeland <ben.copeland@linaro.org>2018-01-03 09:03:02 +0000
committerBen Copeland <ben.copeland@linaro.org>2018-01-03 09:03:02 +0000
commitc4ac5a2463ccab2f63384e1093204709c95c760c (patch)
tree49d9aad64e0a97d10087aa68cd540ac67b8b382f
parent996ba5cc9c552503b7eefc190e81fc9e8472f098 (diff)
Let's just exit script if the Exception is hit, noticed odd dead locks.
Change-Id: I8c62506fd8efd7ba49deaed2997ff4eaddd68fdb
-rwxr-xr-xlinaro-cp.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/linaro-cp.py b/linaro-cp.py
index 4b118df..2126426 100755
--- a/linaro-cp.py
+++ b/linaro-cp.py
@@ -40,10 +40,8 @@ class API_v1(object):
return resp
else:
print("Unsuccessful status:", resp.status_code)
- except requests.exceptions.ReadTimeout:
- sys.exit(0)
except Exception as e:
- print(e)
+ sys.exit(0)
print('Upload failed for %s, retry attempt %s' % (url, x))
time.sleep(2 * x + 1)
retry_count -= 1
@@ -158,10 +156,8 @@ class API_v3(API_v1):
return
else:
print("Unsuccessful status:", resp.status_code)
- except request.exceptions.ReadTimeout:
- sys.exit(0)
except Exception as e:
- print(e)
+ sys.exit(0)
print('Upload failed for %s, retry attempt %s' % (url, x))
time.sleep(2 * x + 1)
retry_count -= 1