cracklib/cracklib-2.8.9-docstring.patch
Nalin Dahyabhai cc74371eea - improve reports of out-of-memory exceptions so that they don't include a
bogus filename
- improve reports of file-missing exceptions from the python module so that
    they give the right filename (#225858)
2007-06-20 18:39:28 +00:00

39 lines
1.2 KiB
Diff

Some docstrings for the Python module. Need to figure out how to fix the
summary in the help() output.
diff -ur cracklib-2.8.9/python/cracklibmodule.c cracklib-2.8.9/python/cracklibmodule.c
--- cracklib-2.8.9/python/cracklibmodule.c 2007-01-29 17:28:41.000000000 -0500
+++ cracklib-2.8.9/python/cracklibmodule.c 2007-01-29 17:20:14.000000000 -0500
@@ -24,7 +24,6 @@
static PyObject *
cracklib_FascistCheck(PyObject *self, PyObject *args, PyObject *kwargs)
{
- int i;
char *candidate, *dict, *dictfile;
const char *result;
struct stat st;
@@ -96,12 +95,21 @@
static PyMethodDef
cracklibmethods[] =
{
- {"FascistCheck", cracklib_FascistCheck, METH_VARARGS | METH_KEYWORDS},
+ {"FascistCheck", cracklib_FascistCheck, METH_VARARGS | METH_KEYWORDS,
+ "Keyword arguments:\n"
+ " pw - candidate password\n"
+ " dict - dictionary location (default \""
+ DEFAULT_CRACKLIB_DICT
+ "\")\n"
+ "\n"
+ "Returns:\n"
+ " None on success, an error string on failure.\n"},
{NULL, NULL},
};
void
initcracklib(void)
{
- Py_InitModule("cracklib", cracklibmethods);
+ Py_InitModule3("cracklib", cracklibmethods,
+ "Python interface to libcrack's FascistCheck() function.\n");
}