summaryrefslogtreecommitdiff
path: root/source3/python
diff options
context:
space:
mode:
Diffstat (limited to 'source3/python')
-rw-r--r--source3/python/py_tdbpack.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/python/py_tdbpack.c b/source3/python/py_tdbpack.c
index c68d6f8c57..1b3cbbceea 100644
--- a/source3/python/py_tdbpack.c
+++ b/source3/python/py_tdbpack.c
@@ -661,8 +661,10 @@ pytdbpack_pack_data(const char *format_str,
long size;
char *sval;
- if (!PyInt_Check(val_obj))
+ if (!PyInt_Check(val_obj)) {
+ pytdbpack_bad_type(ch, "Integer", val_obj);
return NULL;
+ }
size = PyInt_AsLong(val_obj);
pack_uint32(size, &packed);