mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
python: export fault_setup() to python bindings
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13469 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
b9a323a27c
commit
3ddd852710
@ -170,6 +170,16 @@ static PyObject *py_get_debug_level(PyObject *self)
|
||||
return PyInt_FromLong(DEBUGLEVEL);
|
||||
}
|
||||
|
||||
static PyObject *py_fault_setup(PyObject *self)
|
||||
{
|
||||
static bool done;
|
||||
if (!done) {
|
||||
fault_setup();
|
||||
done = true;
|
||||
}
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
static PyObject *py_is_ntvfs_fileserver_built(PyObject *self)
|
||||
{
|
||||
#ifdef WITH_NTVFS_FILESERVER
|
||||
@ -339,6 +349,8 @@ static PyMethodDef py_misc_methods[] = {
|
||||
"set debug level" },
|
||||
{ "get_debug_level", (PyCFunction)py_get_debug_level, METH_NOARGS,
|
||||
"get debug level" },
|
||||
{ "fault_setup", (PyCFunction)py_fault_setup, METH_NOARGS,
|
||||
"setup the default samba panic handler" },
|
||||
{ "interface_ips", (PyCFunction)py_interface_ips, METH_VARARGS,
|
||||
"interface_ips(lp_ctx[, all_interfaces) -> list_of_ifaces\n"
|
||||
"\n"
|
||||
|
@ -381,6 +381,7 @@ def arcfour_encrypt(key, data):
|
||||
|
||||
version = _glue.version
|
||||
interface_ips = _glue.interface_ips
|
||||
fault_setup = _glue.fault_setup
|
||||
set_debug_level = _glue.set_debug_level
|
||||
get_debug_level = _glue.get_debug_level
|
||||
unix2nttime = _glue.unix2nttime
|
||||
|
Loading…
Reference in New Issue
Block a user