summaryrefslogtreecommitdiff
path: root/source4/param/pyparam.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-12-21 23:05:35 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-12-21 23:05:35 +0100
commit2227860a793dbde0b41e6ba1a720ac0d161ad784 (patch)
tree31e9701e978e4355362c199863d11ce52c04d5db /source4/param/pyparam.c
parentd75c51eef34836f9eb5fa3449cef31f6463ce470 (diff)
downloadsamba-2227860a793dbde0b41e6ba1a720ac0d161ad784.tar.gz
Fix more tests, improve repr() functions for various Python types.
Diffstat (limited to 'source4/param/pyparam.c')
-rw-r--r--source4/param/pyparam.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c
index 69a9263c231..04bef072314 100644
--- a/source4/param/pyparam.c
+++ b/source4/param/pyparam.c
@@ -26,7 +26,6 @@
#include "pytalloc.h"
#define PyLoadparmContext_AsLoadparmContext(obj) py_talloc_get_ptr(obj)
-#define PyLoadparmContext_Check(obj) PyObject_TypeCheck(obj, &PyLoadparmContext)
PyAPI_DATA(PyTypeObject) PyLoadparmContext;
PyAPI_DATA(PyTypeObject) PyLoadparmService;
@@ -142,7 +141,7 @@ static PyObject *py_lp_ctx_load(py_talloc_Object *self, PyObject *args)
ret = lp_load((struct loadparm_context *)self->ptr, filename);
if (!ret) {
- PyErr_SetString(PyExc_RuntimeError, "Unable to load file");
+ PyErr_Format(PyExc_RuntimeError, "Unable to load file %s", filename);
return NULL;
}
return Py_None;
@@ -154,7 +153,7 @@ static PyObject *py_lp_ctx_load_default(py_talloc_Object *self)
ret = lp_load_default(self->ptr);
if (!ret) {
- PyErr_SetString(PyExc_RuntimeError, "Unable to load file");
+ PyErr_SetString(PyExc_RuntimeError, "Unable to load default file");
return NULL;
}
return Py_None;