aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--netlib/tcp.py6
-rw-r--r--netlib/test.py6
-rw-r--r--setup.py2
4 files changed, 9 insertions, 8 deletions
diff --git a/.gitignore b/.gitignore
index 26c449d1..ef830f75 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,5 +7,6 @@ MANIFEST
*.swp
*.swo
.coverage
-.idea
+.idea/
__pycache__
+netlib.egg-info/ \ No newline at end of file
diff --git a/netlib/tcp.py b/netlib/tcp.py
index c8a02ab4..4f5423e4 100644
--- a/netlib/tcp.py
+++ b/netlib/tcp.py
@@ -471,7 +471,7 @@ class TCPServer(object):
self.socket.close()
self.handle_shutdown()
- def handle_error(self, request, client_address, fp=sys.stderr):
+ def handle_error(self, connection, client_address, fp=sys.stderr):
"""
Called when handle_client_connection raises an exception.
"""
@@ -479,13 +479,13 @@ class TCPServer(object):
# none.
if traceback:
exc = traceback.format_exc()
- print('-'*40, file=fp)
+ print('-' * 40, file=fp)
print(
"Error in processing of request from %s:%s" % (
client_address.host, client_address.port
), file=fp)
print(exc, file=fp)
- print('-'*40, file=fp)
+ print('-' * 40, file=fp)
def handle_client_connection(self, conn, client_address): # pragma: no cover
"""
diff --git a/netlib/test.py b/netlib/test.py
index 31a848a6..fb468907 100644
--- a/netlib/test.py
+++ b/netlib/test.py
@@ -64,7 +64,7 @@ class TServer(tcp.TCPServer):
key = OpenSSL.crypto.load_privatekey(OpenSSL.crypto.FILETYPE_PEM, raw)
if self.ssl["v3_only"]:
method = tcp.SSLv3_METHOD
- options = tcp.OP_NO_SSLv2|tcp.OP_NO_TLSv1
+ options = OpenSSL.SSL.OP_NO_SSLv2 | OpenSSL.SSL.OP_NO_TLSv1
else:
method = tcp.SSLv23_METHOD
options = None
@@ -80,7 +80,7 @@ class TServer(tcp.TCPServer):
h.handle()
h.finish()
- def handle_error(self, request, client_address):
+ def handle_error(self, connection, client_address, fp=None):
s = cStringIO.StringIO()
- tcp.TCPServer.handle_error(self, request, client_address, s)
+ tcp.TCPServer.handle_error(self, connection, client_address, s)
self.q.put(s.getvalue())
diff --git a/setup.py b/setup.py
index 8609662f..d144855f 100644
--- a/setup.py
+++ b/setup.py
@@ -103,7 +103,7 @@ setup(
"nose>=1.3.0",
"nose-cov>=1.6",
"coveralls>=0.4.1",
- "pathod>=0.10"
+ "pathod>=0.%s" % version.MINORVERSION
]
}
)