diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-11-29 13:26:48 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-11-29 18:04:42 +1100 |
commit | 0dd2152b01b93b2a09ea0332ba60e2e0338b1c15 (patch) | |
tree | 35b1f4d0daea3b5cd61bdd09e44e84049417bb6c /source4 | |
parent | 33d178767b425510448435748bdd780402106ded (diff) | |
download | samba-0dd2152b01b93b2a09ea0332ba60e2e0338b1c15.tar.gz samba-0dd2152b01b93b2a09ea0332ba60e2e0338b1c15.tar.bz2 samba-0dd2152b01b93b2a09ea0332ba60e2e0338b1c15.zip |
s4-pyglue: added get_debug_level() method
Pair-Programmed-With: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/scripting/python/pyglue.c | 7 | ||||
-rw-r--r-- | source4/scripting/python/samba/__init__.py | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/source4/scripting/python/pyglue.c b/source4/scripting/python/pyglue.c index b77ce2bda5..950e3e4b13 100644 --- a/source4/scripting/python/pyglue.c +++ b/source4/scripting/python/pyglue.c @@ -110,6 +110,11 @@ static PyObject *py_set_debug_level(PyObject *self, PyObject *args) Py_RETURN_NONE; } +static PyObject *py_get_debug_level(PyObject *self) +{ + return PyInt_FromLong(DEBUGLEVEL); +} + /* return the list of interface IPs we have configured takes an loadparm context, returns a list of IPs in string form @@ -181,6 +186,8 @@ static PyMethodDef py_misc_methods[] = { "nttime2string(nttime) -> string" }, { "set_debug_level", (PyCFunction)py_set_debug_level, METH_VARARGS, "set debug level" }, + { "get_debug_level", (PyCFunction)py_get_debug_level, METH_NOARGS, + "get debug level" }, { "interface_ips", (PyCFunction)py_interface_ips, METH_VARARGS, "get interface IP address list"}, { NULL } diff --git a/source4/scripting/python/samba/__init__.py b/source4/scripting/python/samba/__init__.py index ee45d931cd..bd7628993e 100644 --- a/source4/scripting/python/samba/__init__.py +++ b/source4/scripting/python/samba/__init__.py @@ -327,6 +327,7 @@ from samba import _glue version = _glue.version interface_ips = _glue.interface_ips set_debug_level = _glue.set_debug_level +get_debug_level = _glue.get_debug_level unix2nttime = _glue.unix2nttime nttime2string = _glue.nttime2string nttime2unix = _glue.nttime2unix |