Add python method for for retrieving (without setting) ts vsflags
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 10 Dec 2007 14:06:22 +0000 (16:06 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 10 Dec 2007 14:06:22 +0000 (16:06 +0200)
python/rpmts-py.c

index 46571d2..5595758 100644 (file)
@@ -827,6 +827,14 @@ fprintf(stderr, "*** rpmts_SetVSFlags(%p) ts %p\n", s, s->ts);
 /** \ingroup py_c
  */
 static PyObject *
+rpmts_GetVSFlags(rpmtsObject * s)
+{
+    return Py_BuildValue("i", rpmtsVSFlags(s->ts));
+}
+
+/** \ingroup py_c
+ */
+static PyObject *
 rpmts_SetColor(rpmtsObject * s, PyObject * args, PyObject * kwds)
 {
     uint32_t tscolor;
@@ -1364,6 +1372,9 @@ static struct PyMethodDef rpmts_methods[] = {
     rpm.RPMVSF_NORSA         if set, don't check header+payload RSA signature\n\
     rpm._RPMVSF_NODIGESTS    if set, don't check digest(s)\n\
     rpm._RPMVSF_NOSIGNATURES if set, don't check signature(s)\n" },
+ {"getVSFlags",(PyCFunction) rpmts_GetVSFlags, METH_NOARGS,
+"ts.getVSFlags() -> vsflags\n\
+- Retrieve current signature verification flags from transaction\n" },
  {"setColor",(PyCFunction) rpmts_SetColor,     METH_VARARGS|METH_KEYWORDS,
        NULL },
  {"pgpPrtPkts",        (PyCFunction) rpmts_PgpPrtPkts, METH_VARARGS|METH_KEYWORDS,