From e7f334583541e1de98614e76a65b7d04e7be4979 Mon Sep 17 00:00:00 2001 From: Ayke Date: Wed, 16 May 2018 19:18:16 +0200 Subject: Make sure a NotImplementedError is always raised on Connection.makefile() (#744) * Make sure a NotImplementedError is always raised on Connection.makefile With this patch, code which calls (for example) conn.makefile('rb') will get a NotImplementedError instead of a confusing TypeError: TypeError: makefile() takes 1 positional argument but 2 were given * ignore any args/kwargs passed --- src/OpenSSL/SSL.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py index 8d8cfe3..4c708ba 100644 --- a/src/OpenSSL/SSL.py +++ b/src/OpenSSL/SSL.py @@ -2039,7 +2039,7 @@ class Connection(object): result.append(pyname) return result - def makefile(self): + def makefile(self, *args, **kwargs): """ The makefile() method is not implemented, since there is no dup semantics for SSL connections -- cgit v1.2.1