]> code.ossystems Code Review - openembedded-core.git/commitdiff
send-error-report: Fix dubious error reporting
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 4 Jul 2018 09:35:47 +0000 (10:35 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 4 Jul 2018 11:19:04 +0000 (12:19 +0100)
Currently this code prints things like:

ERROR: OK

which is unhelpful at best. After this change it would print:

ERROR: HTTP Error 500

which at least gives us something to work on.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/send-error-report

index cd2e7f4b9db32a615fb9fb5328902bb5b7edd956..02014ba9d853896eec4b8c418bc6b9e8942c313c 100755 (executable)
@@ -140,7 +140,7 @@ def send_data(data, args):
     try:
         response = urllib.request.urlopen(req)
     except urllib.error.HTTPError as e:
-        logging.error(e.reason)
+        logging.error(str(e))
         sys.exit(1)
 
     print(response.read().decode('utf-8'))