From c43b9a478218b4809a6c728bcd885ae9edd86c7a Mon Sep 17 00:00:00 2001 From: Benjamin Copeland Date: Mon, 11 Jun 2018 14:11:06 +0100 Subject: 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 --- linaro-cp.py | 4 ++-- 1 file 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: -- cgit v1.2.3