[OE-core] [PATCH 1/2] send-error-report: Fix dubious error reporting

Richard Purdie richard.purdie at linuxfoundation.org
Wed Jul 4 09:43:59 UTC 2018


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 at linuxfoundation.org>
---
 scripts/send-error-report | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/send-error-report b/scripts/send-error-report
index cd2e7f4b9db..02014ba9d85 100755
--- a/scripts/send-error-report
+++ b/scripts/send-error-report
@@ -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'))
-- 
2.17.1




More information about the Openembedded-core mailing list