summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-06-19 17:19:48 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-06-19 22:46:44 +0200
commit27d82685dabf93c41ddbe273563073394d21afd3 (patch)
tree3887a26df096f6f4ce913ce883cc0918957ee3f0
parent74309eb29cba6a9a3c22bcb808b5c2e59a9f9880 (diff)
downloadsamba-27d82685dabf93c41ddbe273563073394d21afd3.tar.gz
samba-27d82685dabf93c41ddbe273563073394d21afd3.tar.bz2
samba-27d82685dabf93c41ddbe273563073394d21afd3.zip
pyglue: Remove unused code.
-rw-r--r--source4/scripting/python/pyglue.c32
1 files changed, 5 insertions, 27 deletions
diff --git a/source4/scripting/python/pyglue.c b/source4/scripting/python/pyglue.c
index 5df1b9de6f..b76cf685de 100644
--- a/source4/scripting/python/pyglue.c
+++ b/source4/scripting/python/pyglue.c
@@ -19,33 +19,13 @@
#include <Python.h>
#include "includes.h"
-#include "ldb.h"
-#include "ldb_errors.h"
-#include "ldb_wrap.h"
#include "param/param.h"
-#include "auth/credentials/credentials.h"
-#include "dsdb/samdb/samdb.h"
-#include "lib/ldb-samba/ldif_handlers.h"
-#include "librpc/ndr/libndr.h"
#include "version.h"
-#include "lib/ldb/pyldb.h"
#include "libcli/util/pyerrors.h"
-#include "libcli/security/security.h"
-#include "auth/pyauth.h"
#include "param/pyparam.h"
-#include "auth/credentials/pycredentials.h"
#include "lib/socket/netif.h"
#include "lib/socket/netif_proto.h"
-/* FIXME: These should be in a header file somewhere, once we finish moving
- * away from SWIG .. */
-#define PyErr_LDB_OR_RAISE(py_ldb, ldb) \
-/* if (!PyLdb_Check(py_ldb)) { \
- PyErr_SetString(py_ldb_get_exception(), "Ldb connection object required"); \
- return NULL; \
- } */\
- ldb = PyLdb_AsLdbContext(py_ldb);
-
static PyObject *py_generate_random_str(PyObject *self, PyObject *args)
{
int len;
@@ -189,8 +169,8 @@ static PyMethodDef py_misc_methods[] = {
{ "generate_random_str", (PyCFunction)py_generate_random_str, METH_VARARGS,
"generate_random_str(len) -> string\n"
"Generate random string with specified length." },
- { "generate_random_password", (PyCFunction)py_generate_random_password, METH_VARARGS,
- "generate_random_password(min, max) -> string\n"
+ { "generate_random_password", (PyCFunction)py_generate_random_password,
+ METH_VARARGS, "generate_random_password(min, max) -> string\n"
"Generate random password with a length >= min and <= max." },
{ "unix2nttime", (PyCFunction)py_unix2nttime, METH_VARARGS,
"unix2nttime(timestamp) -> nttime" },
@@ -216,15 +196,13 @@ void init_glue(void)
if (m == NULL)
return;
- PyModule_AddObject(m, "version", PyString_FromString(SAMBA_VERSION_STRING));
+ PyModule_AddObject(m, "version",
+ PyString_FromString(SAMBA_VERSION_STRING));
/* one of the most annoying things about python scripts is
that they don't die when you hit control-C. This fixes that
sillyness. As we do all database operations using
- transactions, this is also safe. In fact, not dying
- immediately is unsafe as we could end up treating the
- control-C exception as a different error and try to modify
- as database incorrectly
+ transactions, this is also safe.
*/
signal(SIGINT, SIG_DFL);
}