Skip to content

Commit ca2ce1b

Browse files
committed
Fix template.create argument parser signature
PyXmlSec_TemplateCreate still used the format string `O&O!O!|zzz:create` and passed a third optional string argument, even though `template.create()` only accepts two optional string parameters: `id` and `ns`. Update the parser to use `|zz:create` and remove the stray extra `&id` argument so the C binding matches the Python API. This fixes the runtime failure: SystemError: more argument specifiers than keyword list entries (remaining format:'z:create')
1 parent 94cd039 commit ca2ce1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/template.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ static PyObject* PyXmlSec_TemplateCreate(PyObject* self, PyObject *args, PyObjec
4444
xmlNodePtr res;
4545

4646
PYXMLSEC_DEBUG("template create - start");
47-
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O!O!|zzz:create", kwlist,
48-
PyXmlSec_LxmlElementConverter, &node, PyXmlSec_TransformType, &c14n, PyXmlSec_TransformType, &sign, &id, &ns, &id))
47+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O!O!|zz:create", kwlist,
48+
PyXmlSec_LxmlElementConverter, &node, PyXmlSec_TransformType, &c14n, PyXmlSec_TransformType, &sign, &id, &ns))
4949
{
5050
goto ON_FAIL;
5151
}

0 commit comments

Comments
 (0)