Skip to content

Commit 6300b64

Browse files
committed
tls: Fix number arguments taken by sendto()
Closes #62
1 parent 4cc30ae commit 6300b64

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[next]
2+
3+
* tls: Fix check of arguments to TLSWrappedSocket.sendto().
4+
15
[2.0.0] - 2022-04-07
26

37
* tls: Context and TLSWrappedBuffer are now entirely separated.

src/mbedtls/tls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def sendall(self, message, flags=0):
300300
self._socket.sendall(encrypted)
301301

302302
def sendto(self, message, *args):
303-
if not 2 <= len(args) <= 3:
303+
if not 1 <= len(args) <= 2:
304304
raise TypeError(
305305
"sendto() takes 2 or 3 arguments (%i given)" % (1 + len(args))
306306
)

0 commit comments

Comments
 (0)