aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/tcp.py
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-06-17 13:10:27 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-06-17 13:10:27 +0200
commit836b1eab9700230991822102d411aed067308123 (patch)
treec90cc203f95bf6c269cad460270e443b0e8b724e /netlib/tcp.py
parentff20e64537ad25aa988f212b0473bdb5e696611b (diff)
downloadmitmproxy-836b1eab9700230991822102d411aed067308123.tar.gz
mitmproxy-836b1eab9700230991822102d411aed067308123.tar.bz2
mitmproxy-836b1eab9700230991822102d411aed067308123.zip
fix warnings and code smells
use prospector to find them
Diffstat (limited to 'netlib/tcp.py')
-rw-r--r--netlib/tcp.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/netlib/tcp.py b/netlib/tcp.py
index 953cef6e..807015c8 100644
--- a/netlib/tcp.py
+++ b/netlib/tcp.py
@@ -297,7 +297,7 @@ def close_socket(sock):
"""
try:
# We already indicate that we close our end.
- # may raise "Transport endpoint is not connected" on Linux
+ # may raise "Transport endpoint is not connected" on Linux
sock.shutdown(socket.SHUT_WR)
# Section 4.2.2.13 of RFC 1122 tells us that a close() with any pending
@@ -368,10 +368,6 @@ class _Connection(object):
except SSL.Error:
pass
- """
- Creates an SSL Context.
- """
-
def _create_ssl_context(self,
method=SSLv23_METHOD,
options=(OP_NO_SSLv2 | OP_NO_SSLv3),
@@ -383,6 +379,8 @@ class _Connection(object):
alpn_select=None,
):
"""
+ Creates an SSL Context.
+
:param method: One of SSLv2_METHOD, SSLv3_METHOD, SSLv23_METHOD, TLSv1_METHOD, TLSv1_1_METHOD, or TLSv1_2_METHOD
:param options: A bit field consisting of OpenSSL.SSL.OP_* values
:param verify_options: A bit field consisting of OpenSSL.SSL.VERIFY_* values