Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 980f314

Browse files
author
Bill Janssen
committed
fix bad method names in ssl module (and typo in ssl doc)
1 parent 4d45bfe commit 980f314

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

Doc/library/ssl.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Functions, Constants, and Exceptions
129129
method should signal unexpected EOF from the other end of the connection. If specified
130130
as :const:`True` (the default), it returns a normal EOF in response to unexpected
131131
EOF errors raised from the underlying socket; if :const:`False`, it will raise
132-
the exceptions back the caller.
132+
the exceptions back to the caller.
133133

134134
.. function:: RAND_status()
135135

Lib/ssl.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,13 @@ def send(self, data, flags=0):
215215
else:
216216
return socket.send(self, data, flags)
217217

218-
def send_to(self, data, addr, flags=0):
218+
def sendto(self, data, addr, flags=0):
219219
self._checkClosed()
220220
if self._sslobj:
221-
raise ValueError("send_to not allowed on instances of %s" %
221+
raise ValueError("sendto not allowed on instances of %s" %
222222
self.__class__)
223223
else:
224-
return socket.send_to(self, data, addr, flags)
224+
return socket.sendto(self, data, addr, flags)
225225

226226
def sendall(self, data, flags=0):
227227
self._checkClosed()
@@ -276,13 +276,13 @@ def recv_into(self, buffer, nbytes=None, flags=0):
276276
else:
277277
return socket.recv_into(self, buffer, nbytes, flags)
278278

279-
def recv_from(self, addr, buflen=1024, flags=0):
279+
def recvfrom(self, addr, buflen=1024, flags=0):
280280
self._checkClosed()
281281
if self._sslobj:
282-
raise ValueError("recv_from not allowed on instances of %s" %
282+
raise ValueError("recvfrom not allowed on instances of %s" %
283283
self.__class__)
284284
else:
285-
return socket.recv_from(self, addr, buflen, flags)
285+
return socket.recvfrom(self, addr, buflen, flags)
286286

287287
def pending(self):
288288
self._checkClosed()

0 commit comments

Comments
 (0)