1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

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 <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall 2019-07-09 23:07:18 +12:00 committed by Andrew Bartlett
parent f8fb6f3261
commit a5e8a5e05b

View File

@ -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;
}