diff options
author | Tomas Mraz <tmraz@redhat.com> | 2011-11-10 10:53:59 +0100 |
---|---|---|
committer | Tomas Mraz <tmraz@redhat.com> | 2011-11-10 10:53:59 +0100 |
commit | 0cdd8bb09cbebc44e53a2d3f2768635485f946e6 (patch) | |
tree | 788accace1ad843edcb21c30a86f57c8ab8a1d48 /python | |
parent | 526a5c046f68e53cf1ee66289397610a534535a5 (diff) | |
download | libpwquality-0cdd8bb09cbebc44e53a2d3f2768635485f946e6.tar.gz |
Allow None for oldpassword and username.
Diffstat (limited to 'python')
-rw-r--r-- | python/pwquality.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/python/pwquality.c b/python/pwquality.c index e60152f..be65c27 100644 --- a/python/pwquality.c +++ b/python/pwquality.c @@ -127,12 +127,12 @@ static PyTypeObject pwqsettings_type = { 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ "PWQSettings objects", /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iternext */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + 0, /* tp_iter */ + 0, /* tp_iternext */ pwqsettings_methods, /* tp_methods */ 0, /* tp_members */ pwqsettings_getseters, /* tp_getset */ @@ -325,7 +325,7 @@ check(PWQSettings *self, PyObject *args) void *auxerror; int rc; - if (!PyArg_ParseTuple(args, "s|ss", &password, &oldpassword, &username)) + if (!PyArg_ParseTuple(args, "s|zz", &password, &oldpassword, &username)) return NULL; if ((rc = pwquality_check(self->pwq, password, oldpassword, username, &auxerror)) < 0) { @@ -359,7 +359,7 @@ initpwquality(void) Py_INCREF(&pwqsettings_type); PyModule_AddObject(module, "PWQSettings", (PyObject *)&pwqsettings_type); -#include "constants.c" +#include "constants.c" } /* |