commit eb1daf87240830d8c875455ad92a708ce8443d65 Author: Arturo Filastò art@fuffa.org Date: Wed Feb 4 14:17:55 2015 +0100
Fix some bugs in oonireport --- ooni/report/tool.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/ooni/report/tool.py b/ooni/report/tool.py index 11dbeda..9eaad5e 100644 --- a/ooni/report/tool.py +++ b/ooni/report/tool.py @@ -22,9 +22,16 @@ def upload(report_file, collector=None, bouncer=None): report = parser.ReportLoader(report_file) if bouncer: oonib_client = OONIBClient(bouncer) - collector = yield oonib_client.lookupTestCollector( - report.header['test_name'] + net_tests = [{ + 'test-helpers': [], + 'input-hashes': report.header['input_hashes'], + 'name': report.header['test_name'], + 'version': report.header['test_version'], + }] + result = yield oonib_client.lookupTestCollector( + net_tests ) + collector = str(result['net-tests'][0]['collector'])
if collector is None: try: @@ -57,7 +64,7 @@ def upload_all(collector=None, bouncer=None): try: yield upload(report_file, collector, bouncer) except Exception as exc: - print exc + log.exception(exc)
def print_report(report_file, value):
tor-commits@lists.torproject.org