summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2020-03-09 11:43:17 +0100
committerMatěj Cepl <mcepl@cepl.eu>2020-03-09 11:44:41 +0100
commit77e6726d23b7d104852d0df61ecd2b4988616bf9 (patch)
treec4e3473ed342080b73d29357fb16f4005b0bb303
parentd3a43ffe1bfe4c128d6ab7c390419dee68f4ca5a (diff)
downloadm2crypto-77e6726d23b7d104852d0df61ecd2b4988616bf9.tar.gz
Cleanup
-rw-r--r--M2Crypto/SSL/Connection.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/M2Crypto/SSL/Connection.py b/M2Crypto/SSL/Connection.py
index 01bb61c..45b3ee6 100644
--- a/M2Crypto/SSL/Connection.py
+++ b/M2Crypto/SSL/Connection.py
@@ -20,7 +20,7 @@ from M2Crypto.SSL import SSLError
from M2Crypto.SSL.Cipher import Cipher, Cipher_Stack
from M2Crypto.SSL.Session import Session
if py27plus:
- from typing import Any, AnyStr, Callable, Dict, List, Optional, Tuple, Union # noqa
+ from typing import Any, AnyStr, Callable, Optional, Tuple, Union # noqa
__all__ = ['Connection',
'timeout', # XXX Not really, but for documentation purposes
@@ -588,7 +588,7 @@ class Connection(object):
raw = socket.SocketIO(self, mode)
if 'rw' in mode:
return io.BufferedRWPair(raw, raw)
- return io.BufferedReader(raw, io.DEFAULT_BUFFER_SIZE)
+ return io.BufferedReader(raw)
else:
return socket._fileobject(self, mode, bufsize)
@@ -651,9 +651,9 @@ class Connection(object):
binstr = self.socket.getsockopt(
socket.SOL_SOCKET, socket.SO_SNDTIMEO, timeout.struct_size())
timeo = timeout.struct_to_timeout(binstr)
- #print("Debug: get_socket_write_timeout: "
- # "get sockopt value: %s -> returned timeout(sec=%r, microsec=%r)" %
- # (self._hexdump(binstr), timeo.sec, timeo.microsec))
+ # print("Debug: get_socket_write_timeout: "
+ # "get sockopt value: %s -> ret timeout(sec=%r, microsec=%r)" %
+ # (self._hexdump(binstr), timeo.sec, timeo.microsec))
return timeo
def set_socket_read_timeout(self, timeo):
@@ -666,9 +666,9 @@ class Connection(object):
# type: (timeout) -> None
assert isinstance(timeo, timeout.timeout)
binstr = timeo.pack()
- #print("Debug: set_socket_write_timeout: "
- # "input timeout(sec=%r, microsec=%r) -> set sockopt value: %s" %
- # (timeo.sec, timeo.microsec, self._hexdump(binstr)))
+ # print("Debug: set_socket_write_timeout: "
+ # "input timeout(sec=%r, microsec=%r) -> set sockopt value: %s" %
+ # (timeo.sec, timeo.microsec, self._hexdump(binstr)))
self.socket.setsockopt(
socket.SOL_SOCKET, socket.SO_SNDTIMEO, binstr)