diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-06-18 11:07:33 +0200 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-06-18 11:07:33 +0200 |
commit | 65be004bb2e0f8ba9a4712d0172bb0d0151a33bb (patch) | |
tree | efc377e4d4688264ca12e19f35d00ac04f4104ba /libpathod/pathod.py | |
parent | bd0cfef357ff33ab8be216998e8de69c1784c043 (diff) | |
download | mitmproxy-65be004bb2e0f8ba9a4712d0172bb0d0151a33bb.tar.gz mitmproxy-65be004bb2e0f8ba9a4712d0172bb0d0151a33bb.tar.bz2 mitmproxy-65be004bb2e0f8ba9a4712d0172bb0d0151a33bb.zip |
fix prospector code smells
Diffstat (limited to 'libpathod/pathod.py')
-rw-r--r-- | libpathod/pathod.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libpathod/pathod.py b/libpathod/pathod.py index 212abbdc..240df7bd 100644 --- a/libpathod/pathod.py +++ b/libpathod/pathod.py @@ -4,7 +4,6 @@ import os import sys import threading import urllib -import re import time from netlib import tcp, http, http2, wsgi, certutils, websockets, odict @@ -29,7 +28,7 @@ class PathodError(Exception): pass -class SSLOptions: +class SSLOptions(object): def __init__( self, confdir=CONFDIR, @@ -241,7 +240,7 @@ class PathodHandler(tcp.BaseHandler): return req['next_handle'] if 'errors' in req: return None, req['errors'] - if not 'method' in req or not 'path' in req: + if 'method' not in req or 'path' not in req: return None, None method = req['method'] path = req['path'] @@ -443,11 +442,11 @@ class PathodHandler(tcp.BaseHandler): # moment because JSON encoding can't handle binary data, and I don't # want to base64 everything. if self.server.logreq: - bytes = self.rfile.get_log().encode("string_escape") - log["request_bytes"] = bytes + encoded_bytes = self.rfile.get_log().encode("string_escape") + log["request_bytes"] = encoded_bytes if self.server.logresp: - bytes = self.wfile.get_log().encode("string_escape") - log["response_bytes"] = bytes + encoded_bytes = self.wfile.get_log().encode("string_escape") + log["response_bytes"] = encoded_bytes self.server.add_log(log) |