From a5e8a5e05bcb89a3fc36044ce89ac49df2f00d03 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Tue, 9 Jul 2019 23:07:18 +1200 Subject: auth/pycreds/encrypt_netr_crypt_password: don't pretend arg is optional The "|O" signature is saying the password argument is optional, which makes no sense in terms of the funxtion and immediately leads to a TypeError (or until last commit, segfault). Removing the "|" leaves it with a TypeError, but it is better worded and faster. Signed-off-by: Douglas Bagnall Reviewed-by: Gary Lockyer Reviewed-by: Andrew Bartlett --- auth/credentials/pycredentials.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'auth') diff --git a/auth/credentials/pycredentials.c b/auth/credentials/pycredentials.c index 91e9276473d..446f30970a2 100644 --- a/auth/credentials/pycredentials.c +++ b/auth/credentials/pycredentials.c @@ -906,7 +906,7 @@ static PyObject *py_creds_encrypt_netr_crypt_password(PyObject *self, return NULL; } - if (!PyArg_ParseTuple(args, "|O", &py_cp)) { + if (!PyArg_ParseTuple(args, "O", &py_cp)) { return NULL; } -- cgit v1.2.1