From 64b835b1bff4c8bd37f5d72e17339117c8167933 Mon Sep 17 00:00:00 2001 From: mwobensmith Date: Mon, 26 Feb 2018 17:58:11 +0100 Subject: [PATCH] Handle error case - no error string --- tlscanary/report.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tlscanary/report.py b/tlscanary/report.py index 1ea45c4..e775b81 100644 --- a/tlscanary/report.py +++ b/tlscanary/report.py @@ -78,7 +78,10 @@ def web_report(log, report_dir): # Filter out stray timeout errors connection_speed = line["response"]["response_time"]-line["response"]["command_time"] timeout = line["response"]["original_cmd"]["args"]["timeout"] * 1000 - error_message = line["response"]["result"]["info"]["short_error_message"] + try: + error_message = line["response"]["result"]["info"]["short_error_message"] + except KeyError: + error_message = "unknown" if error_message == "NS_BINDING_ABORTED" and connection_speed > timeout: continue uri_data.append(line)