diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2015-03-13 23:14:37 +1100 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2015-03-13 23:14:37 +1100 |
commit | a4f500c82e4eab8c2013e76d607c96fedbf35c73 (patch) | |
tree | eea1d1dc0c5b6621f2f9d04b7a2a9dba24caed96 /libmproxy/console/common.py | |
parent | 60dce08d546aef3698509bdb2572e9868902e016 (diff) | |
download | mitmproxy-a4f500c82e4eab8c2013e76d607c96fedbf35c73.tar.gz mitmproxy-a4f500c82e4eab8c2013e76d607c96fedbf35c73.tar.bz2 mitmproxy-a4f500c82e4eab8c2013e76d607c96fedbf35c73.zip |
Indentation, style, whitespace
Diffstat (limited to 'libmproxy/console/common.py')
-rw-r--r-- | libmproxy/console/common.py | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/libmproxy/console/common.py b/libmproxy/console/common.py index 6c0f481b..3a708c7c 100644 --- a/libmproxy/console/common.py +++ b/libmproxy/console/common.py @@ -1,7 +1,9 @@ from __future__ import absolute_import + import urwid import urwid.util import os + from .. import utils from ..protocol.http import CONTENT_MISSING, decoded @@ -284,15 +286,16 @@ def ask_copy_part(scope, flow, master, state): def ask_save_body(part, master, state, flow): """ - Save either the request or the response body to disk. - part can either be "q" (request), "s" (response) or None (ask user if necessary). + Save either the request or the response body to disk. part can either be + "q" (request), "s" (response) or None (ask user if necessary). """ request_has_content = flow.request and flow.request.content response_has_content = flow.response and flow.response.content if part is None: - # We first need to determine whether we want to save the request or the response content. + # We first need to determine whether we want to save the request or the + # response content. if request_has_content and response_has_content: master.prompt_onekey( "Save", @@ -311,9 +314,19 @@ def ask_save_body(part, master, state, flow): ask_save_body("q", master, state, flow) elif part == "q" and request_has_content: - ask_save_path("Save request content: ", flow.request.get_decoded_content(), master, state) + ask_save_path( + "Save request content: ", + flow.request.get_decoded_content(), + master, + state + ) elif part == "s" and response_has_content: - ask_save_path("Save response content: ", flow.response.get_decoded_content(), master, state) + ask_save_path( + "Save response content: ", + flow.response.get_decoded_content(), + master, + state + ) else: master.statusbar.message("No content to save.") |