Synss / python-mbedtls

Cryptographic library with an mbed TLS back end
MIT License
79 stars 28 forks source link

error control nb args #62

Closed nicho2 closed 2 years ago

nicho2 commented 2 years ago

NOTE: Please use stackoverflow for support questions. This repository's issues are reserved for feature requests and bug reports.

I am submitting a …

Description

in the file tls.py, there is an error about the length of args in function sendto (line 302)

Current behavior

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

args can have one or two 'arg' : flag and address also the control must be:

if not 1 <= len(args) <= 2:

Synss commented 2 years ago

Indeed, you are correct. 😊