diff options
author | Andrew Bartlett <abartlet@samba.org> | 2016-08-25 11:28:32 +1200 |
---|---|---|
committer | Garming Sam <garming@samba.org> | 2016-09-01 05:49:14 +0200 |
commit | 9142a01bb55a09e836c70d15fe420fb2599aec6f (patch) | |
tree | a2f671c351d9a88aa49c6198382c7ed965ccda33 /source4/dsdb/pydsdb.c | |
parent | 599d3f7f8358f6107e1d13ab0a92c3143f32435e (diff) | |
download | samba-9142a01bb55a09e836c70d15fe420fb2599aec6f.tar.gz |
pydsdb: Raise TypeError for type errors, rather than incorrectly raising an LdbError
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Diffstat (limited to 'source4/dsdb/pydsdb.c')
-rw-r--r-- | source4/dsdb/pydsdb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c index efaf66b93ca..1fe8c13e6e5 100644 --- a/source4/dsdb/pydsdb.c +++ b/source4/dsdb/pydsdb.c @@ -34,14 +34,14 @@ void initdsdb(void); /* FIXME: These should be in a header file somewhere */ #define PyErr_LDB_OR_RAISE(py_ldb, ldb) \ if (!py_check_dcerpc_type(py_ldb, "ldb", "Ldb")) { \ - PyErr_SetString(py_ldb_get_exception(), "Ldb connection object required"); \ + PyErr_SetString(PyExc_TypeError, "Ldb connection object required"); \ return NULL; \ } \ ldb = pyldb_Ldb_AsLdbContext(py_ldb); #define PyErr_LDB_DN_OR_RAISE(py_ldb_dn, dn) \ if (!py_check_dcerpc_type(py_ldb_dn, "ldb", "Dn")) { \ - PyErr_SetString(py_ldb_get_exception(), "ldb Dn object required"); \ + PyErr_SetString(PyExc_TypeError, "ldb Dn object required"); \ return NULL; \ } \ dn = pyldb_Dn_AsDn(py_ldb_dn); |