From fe61a53991f6d4a73207c0d2132c86e6a14ae9b9 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Mon, 4 Nov 2002 21:56:24 +0000 Subject: pytdbpack_calc_reqd_len: It's no longer an error to supply more data values than are consumed. (This used to be commit 0c1cfe559877d51090409d67f983a82bbbbaa7e2) --- source3/python/py_tdbpack.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/source3/python/py_tdbpack.c b/source3/python/py_tdbpack.c index 8478ab28a5..6c697533a0 100644 --- a/source3/python/py_tdbpack.c +++ b/source3/python/py_tdbpack.c @@ -307,7 +307,8 @@ pytdbpack_calc_reqd_len(char *format_str, if (val_i >= val_len) { PyErr_Format(PyExc_IndexError, - "samba.tdbpack.pack: value list is too short for format string"); + "%s: value list is too short for format string", + __FUNCTION__); return -1; } @@ -323,13 +324,6 @@ pytdbpack_calc_reqd_len(char *format_str, len += item_len; } - if (val_i != val_len) { - PyErr_Format(PyExc_IndexError, - "%s: value list is wrong length for format string", - __FUNCTION__); - return -1; - } - return len; } -- cgit