summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-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