summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Copeland <ben.copeland@linaro.org>2018-06-11 14:11:06 +0100
committerBenjamin Copeland <ben.copeland@linaro.org>2018-06-11 14:11:06 +0100
commitc43b9a478218b4809a6c728bcd885ae9edd86c7a (patch)
treea7ad84c29e296b225beb556f9a7ab069522831f5
parent47a79b01bb8eeee5bd7415e3fb74bac17c2502dd (diff)
Reporting: Be more verbose on output.
It is hard to debug what the API has returned with a error, this change will return the API failure message to help with debugging. Change-Id: Id82a7352e9431957ef1a407068003e4c8b52e76c
-rwxr-xr-xlinaro-cp.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/linaro-cp.py b/linaro-cp.py
index ee14994..3568789 100755
--- a/linaro-cp.py
+++ b/linaro-cp.py
@@ -31,7 +31,7 @@ class API_v1(object):
if resp.status_code in (200, 201):
return resp
else:
- print("Unsuccessful status:", resp.status_code)
+ print("Unsuccessful status:", resp.status_code, resp.content)
except Exception as e:
print(e)
if retry_count == 4:
@@ -157,7 +157,7 @@ class API_v3(API_v1):
if resp.status_code in (200, 201):
return
else:
- print("Unsuccessful status:", resp.status_code)
+ print("Unsuccessful status:", resp.status_code, resp.content)
except Exception as e:
print(e)
if retry_count == 4: