summaryrefslogtreecommitdiffstats
path: root/scripts/send-error-report
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-04-25 16:05:19 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-04-25 16:08:42 +0100
commit4726c180470222b343adffa3c2eda118d688f5fc (patch)
tree052442a1a835dad13d1083c579182b4dbcc51e73 /scripts/send-error-report
parent640970e6b73804e06dc019d0ed1d483a82f0cdd9 (diff)
downloadpoky-4726c180470222b343adffa3c2eda118d688f5fc.tar.gz
send-error-report: Apply v2 of the patch
The v1 of the patch was merged, update to v2. (From OE-Core rev: 54c84be6e4643396b47b7d8cca803f914455ade9) Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/send-error-report')
-rwxr-xr-xscripts/send-error-report17
1 files changed, 6 insertions, 11 deletions
diff --git a/scripts/send-error-report b/scripts/send-error-report
index 699ffb797c..6418dab165 100755
--- a/scripts/send-error-report
+++ b/scripts/send-error-report
@@ -142,10 +142,9 @@ def send_data(data, args):
142 142
143 req = urllib.request.Request(url, data=data, headers=headers) 143 req = urllib.request.Request(url, data=data, headers=headers)
144 144
145 if args.debug: 145 log.debug(f"Request URL: {url}")
146 log.debug(f"Request URL: {url}") 146 log.debug(f"Request Headers: {headers}")
147 log.debug(f"Request Headers: {headers}") 147 log.debug(f"Request Data: {data.decode('utf-8')}")
148 log.debug(f"Request Data: {data.decode('utf-8')}")
149 148
150 try: 149 try:
151 response = urllib.request.urlopen(req) 150 response = urllib.request.urlopen(req)
@@ -154,13 +153,9 @@ def send_data(data, args):
154 log.debug(f"Response Content: {e.read().decode('utf-8')}") 153 log.debug(f"Response Content: {e.read().decode('utf-8')}")
155 sys.exit(1) 154 sys.exit(1)
156 155
157 if args.debug: 156 log.debug(f"Response Status: {response.status}")
158 log.debug(f"Response Status: {response.status}") 157 log.debug(f"Response Headers: {response.getheaders()}")
159 log.debug(f"Response Headers: {response.getheaders()}") 158 log.info(response.read().decode('utf-8'))
160 log.debug(f"Response Content: {response.read().decode('utf-8')}")
161 else:
162 print(response.read().decode('utf-8'))
163
164 159
165def validate_server_url(args): 160def validate_server_url(args):
166 # Get the error report server from an argument 161 # Get the error report server from an argument