Browse Source

send-error-report: Fix dubious error reporting

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.

(From OE-Core rev: 06079240e4eb0a3e1f528f6c8d6f3ea20754afee)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie 7 năm trước cách đây
mục cha
commit
83b0109149
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      scripts/send-error-report

+ 1 - 1
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'))