From 0b8ff2231a36755a71d8bf8c7854364d69ef2df8 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Wed, 2 Apr 2014 12:25:37 +0000 Subject: send-error-report: show response * useful when debuging why it was refused by server Signed-off-by: Martin Jansa Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- scripts/send-error-report | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/send-error-report b/scripts/send-error-report index 0d85776340..8eea3cfebb 100755 --- a/scripts/send-error-report +++ b/scripts/send-error-report @@ -53,9 +53,11 @@ def sendData(json_file, server): print response.status, response.reason res = response.read() if response.status == 200: - print res + print(res) else: - print("There was a problem submiting your data") + print("There was a problem submiting your data, response written in %s.response.html" % json_file) + with open("%s.response.html" % json_file, "w") as f: + f.write(res) conn.close() except: print("Server connection failed") -- cgit v1.2.3