From 8a672b7955a4a1bc3268755022afd2ca0e05e283 Mon Sep 17 00:00:00 2001 From: Marcelo Glezer Date: Tue, 3 Mar 2015 00:55:23 -0300 Subject: minor refactor --- libmproxy/console/flowdetailview.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libmproxy/console/flowdetailview.py b/libmproxy/console/flowdetailview.py index 301be9b8..8f1f013e 100644 --- a/libmproxy/console/flowdetailview.py +++ b/libmproxy/console/flowdetailview.py @@ -48,9 +48,9 @@ class FlowDetailsView(urwid.ListBox): timing_parts.append(["Server conn. TCP handshake", utils.format_timestamp_with_milli(sc.timestamp_tcp_setup) if sc.timestamp_tcp_setup else "active"]) if sc.ssl_established: timing_parts.append(["Server conn. SSL handshake", utils.format_timestamp_with_milli(sc.timestamp_ssl_setup) if sc.timestamp_ssl_setup else "active"]) - if cc: - if sc.ssl_established: - timing_parts.append(["Client conn. SSL handshake", utils.format_timestamp_with_milli(cc.timestamp_ssl_setup) if cc.timestamp_ssl_setup else "active"]) + + if cc and sc.ssl_established: + timing_parts.append(["Client conn. SSL handshake", utils.format_timestamp_with_milli(cc.timestamp_ssl_setup) if cc.timestamp_ssl_setup else "active"]) timing_parts.append(["First request byte", utils.format_timestamp_with_milli(req.timestamp_start)]) timing_parts.append(["Request complete", utils.format_timestamp_with_milli(req.timestamp_end) if req.timestamp_end else "active"]) @@ -59,7 +59,6 @@ class FlowDetailsView(urwid.ListBox): timing_parts.append(["First response byte", utils.format_timestamp_with_milli(resp.timestamp_start)]) timing_parts.append(["response complete", utils.format_timestamp_with_milli(resp.timestamp_end) if resp.timestamp_end else "active"]) - if sc: text.append(urwid.Text([("head", "Server Connection:")])) parts = [ @@ -68,7 +67,7 @@ class FlowDetailsView(urwid.ListBox): text.extend(common.format_keyvals(parts, key="key", val="text", indent=4)) - c = self.flow.server_conn.cert + c = sc.cert if c: text.append(urwid.Text([("head", "Server Certificate:")])) parts = [ -- cgit v1.2.3