Author: Matti Picus <[email protected]>
Branch:
Changeset: r438:b5639ac3c520
Date: 2020-01-17 08:27 +1100
http://bitbucket.org/pypy/benchmarks/changeset/b5639ac3c520/
Log: try to make sending more robust
diff --git a/runner.py b/runner.py
--- a/runner.py
+++ b/runner.py
@@ -309,6 +309,7 @@
baseline_path=baseline_path,
full_store=full_store, branch=branch)
+ errors = []
for run in [CHANGED, BASELINE]:
upload = upload_options[run]['upload']
urls = upload_options[run]['urls']
@@ -321,8 +322,13 @@
# prevent to upload results from the nullpython dummy
host = force_host if force_host else socket.gethostname()
for url in urls:
- print(save(project, revision, results, executable, host, url,
+ try:
+ print(save(project, revision, results, executable, host,
url,
changed=(run == CHANGED), branch=branch))
+ except IOErrr as e:
+ errors.append(e)
+ if len(errors) > 0:
+ raise errors[0]
if __name__ == '__main__':
diff --git a/saveresults.py b/saveresults.py
--- a/saveresults.py
+++ b/saveresults.py
@@ -32,6 +32,7 @@
except ImportError:
import urllib.request as urllib2
import json
+import pprint
def save(project, revision, results, executeable, host, url, testing=False,
@@ -76,7 +77,7 @@
'result_value': value,
'branch': branch,
}]
- if value is None:
+ if not value:
print("Ignoring skipped result", data)
continue
if res_type == "ComparisonResult":
@@ -132,6 +133,8 @@
if hasattr(e, 'readlines'):
response = "".join([response] + e.readlines())
print(response)
+ print('when sending')
+ pprint.pprint(data)
with open('error.html', 'w') as error_file:
error_file.write(response)
print("Server (%s) response written to error.html" % (url,))
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit