aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/pathod.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2014-01-19 18:20:01 +1300
committerAldo Cortesi <aldo@nullcube.com>2014-01-19 18:20:01 +1300
commit26d6b189fc0a58375d46898ad57abadba44bb4d0 (patch)
treefd58113263b50f7dc957060d8aa6812b6d4ec22c /libpathod/pathod.py
parent25ed5537dad2a6b339ccd5945c0ed232ed5ab035 (diff)
downloadmitmproxy-26d6b189fc0a58375d46898ad57abadba44bb4d0.tar.gz
mitmproxy-26d6b189fc0a58375d46898ad57abadba44bb4d0.tar.bz2
mitmproxy-26d6b189fc0a58375d46898ad57abadba44bb4d0.zip
Pyflakes cleanup, adjust requirements.txt
Diffstat (limited to 'libpathod/pathod.py')
-rw-r--r--libpathod/pathod.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/libpathod/pathod.py b/libpathod/pathod.py
index d925de24..93f7a8ae 100644
--- a/libpathod/pathod.py
+++ b/libpathod/pathod.py
@@ -1,5 +1,5 @@
-import urllib, threading, re, logging, socket, sys, base64
-from netlib import tcp, http, odict, wsgi, certutils
+import urllib, threading, re, logging
+from netlib import tcp, http, wsgi, certutils
import netlib.utils
import version, app, language, utils
@@ -158,13 +158,13 @@ class PathodHandler(tcp.BaseHandler):
cc = wsgi.ClientConn(self.client_address)
req = wsgi.Request(cc, "http", method, path, headers, content)
sn = self.connection.getsockname()
- app = wsgi.WSGIAdaptor(
+ a = wsgi.WSGIAdaptor(
self.server.app,
sn[0],
self.server.port,
version.NAMEVERSION
)
- app.serve(req, self.wfile)
+ a.serve(req, self.wfile)
return True, None
def _log_bytes(self, header, data, hexdump):
@@ -257,7 +257,7 @@ class Pathod(tcp.TCPServer):
except re.error:
raise PathodError("Invalid regex in anchor: %s"%i[0])
try:
- aresp = language.parse_response(self.request_settings, i[1])
+ language.parse_response(self.request_settings, i[1])
except language.ParseException, v:
raise PathodError("Invalid page spec in anchor: '%s', %s"%(i[1], str(v)))
self.anchors.append((arex, i[1]))
@@ -268,7 +268,7 @@ class Pathod(tcp.TCPServer):
"""
try:
l = req.maximum_length(settings)
- except language.FileAccessDenied, v:
+ except language.FileAccessDenied:
return "File access denied."
if self.sizelimit and l > self.sizelimit:
return "Response too large."