]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
send-error-report: Apply v2 of the patch
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 25 Apr 2025 15:05:19 +0000 (16:05 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 25 Apr 2025 15:08:40 +0000 (16:08 +0100)
The v1 of the patch was merged, update to v2.

Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/send-error-report

index 699ffb797c0c7d49e062051c71f78a7639863d29..6418dab165d4b157e4c7e1cc2aac0ae7df91356b 100755 (executable)
@@ -142,10 +142,9 @@ def send_data(data, args):
 
     req = urllib.request.Request(url, data=data, headers=headers)
 
-    if args.debug:
-        log.debug(f"Request URL: {url}")
-        log.debug(f"Request Headers: {headers}")
-        log.debug(f"Request Data: {data.decode('utf-8')}")
+    log.debug(f"Request URL: {url}")
+    log.debug(f"Request Headers: {headers}")
+    log.debug(f"Request Data: {data.decode('utf-8')}")
 
     try:
         response = urllib.request.urlopen(req)
@@ -154,13 +153,9 @@ def send_data(data, args):
         log.debug(f"Response Content: {e.read().decode('utf-8')}")
         sys.exit(1)
 
-    if args.debug:
-        log.debug(f"Response Status: {response.status}")
-        log.debug(f"Response Headers: {response.getheaders()}")
-        log.debug(f"Response Content: {response.read().decode('utf-8')}")
-    else:
-        print(response.read().decode('utf-8'))
-
+    log.debug(f"Response Status: {response.status}")
+    log.debug(f"Response Headers: {response.getheaders()}")
+    log.info(response.read().decode('utf-8'))
 
 def validate_server_url(args):
     # Get the error report server from an argument