diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-07-23 11:55:27 -0700 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-07-23 11:55:27 -0700 |
commit | 61de6fa1d65d4219c6798ab025e1beeca1247068 (patch) | |
tree | 059b608115706c7325316b3af49e50e2ccf3fba9 /mitmproxy | |
parent | 9b40e1072cf66ba15266085faee3434a5750f52c (diff) | |
download | mitmproxy-61de6fa1d65d4219c6798ab025e1beeca1247068.tar.gz mitmproxy-61de6fa1d65d4219c6798ab025e1beeca1247068.tar.bz2 mitmproxy-61de6fa1d65d4219c6798ab025e1beeca1247068.zip |
fix test_view_urlencoded
Diffstat (limited to 'mitmproxy')
-rw-r--r-- | mitmproxy/contentviews.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mitmproxy/contentviews.py b/mitmproxy/contentviews.py index 054f1f2d..e155bc01 100644 --- a/mitmproxy/contentviews.py +++ b/mitmproxy/contentviews.py @@ -109,12 +109,16 @@ class View(object): prompt = () content_types = [] - def __call__(self, data, **metadata): + def __call__( + self, + data, # type: bytes + **metadata + ): """ Transform raw data into human-readable output. Args: - data: the data to decode/format as bytes. + data: the data to decode/format. metadata: optional keyword-only arguments for metadata. Implementations must not rely on a given argument being present. @@ -282,7 +286,7 @@ class ViewURLEncoded(View): def __call__(self, data, **metadata): try: - data = data.decode("ascii","strict") + data = data.decode("ascii", "strict") except ValueError: return None d = url.decode(data) |