diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-02-24 14:01:17 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-02-24 14:01:17 +1300 |
commit | 5810e7c0df3f33c20a34daa1bb6480f7bd762353 (patch) | |
tree | e11f6b52aef5834b078009795ae79d82431619d8 /libmproxy/console | |
parent | 25fa596cd6aa6468d1a7dd5d8c2fc5bfc7cef004 (diff) | |
download | mitmproxy-5810e7c0df3f33c20a34daa1bb6480f7bd762353.tar.gz mitmproxy-5810e7c0df3f33c20a34daa1bb6480f7bd762353.tar.bz2 mitmproxy-5810e7c0df3f33c20a34daa1bb6480f7bd762353.zip |
Make return arrow match return code color.
Suggested by Jim Cheetham <jim.cheetham@otago.ac.nz>
Diffstat (limited to 'libmproxy/console')
-rw-r--r-- | libmproxy/console/common.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libmproxy/console/common.py b/libmproxy/console/common.py index 22d9e51d..03880522 100644 --- a/libmproxy/console/common.py +++ b/libmproxy/console/common.py @@ -143,10 +143,11 @@ def format_flow(f, focus, extended=False, padding=2): ("fixed", preamble, urwid.Text("")) ) - if f.response or f.error: - resp.append(fcol(SYMBOL_RETURN, "method")) - if f.response: + if f.response.code in [200, 304]: + resp.append(fcol(SYMBOL_RETURN, "goodcode")) + else: + resp.append(fcol(SYMBOL_RETURN, "error")) if f.response.is_replay(): resp.append(fcol(SYMBOL_REPLAY, "replay")) if f.response.code in [200, 304]: @@ -168,6 +169,7 @@ def format_flow(f, focus, extended=False, padding=2): else: resp.append(fcol("[empty content]", rc)) elif f.error: + resp.append(fcol(SYMBOL_RETURN, "error")) resp.append( urwid.Text([ ( |