From ab66c9ff47664fcfae6eea2146be65ccbff43195 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 23 Sep 2009 17:44:07 +0300 Subject: [PATCH] Remove unnecessary header type checking - the type is already validated by PyArg_ParseTupleAndKeywords(), no need to doublecheck --- python/rpmts-py.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/python/rpmts-py.c b/python/rpmts-py.c index ab4f5b9..ed33ab3 100644 --- a/python/rpmts-py.c +++ b/python/rpmts-py.c @@ -184,13 +184,6 @@ rpmts_AddInstall(rpmtsObject * s, PyObject * args, PyObject * kwds) &hdr_Type, &h, &key, &how)) return NULL; - { PyObject * hObj = (PyObject *) h; - if (hObj->ob_type != &hdr_Type) { - PyErr_SetString(PyExc_TypeError, "bad type for header argument"); - return NULL; - } - } - if (how && !rstreq(how, "u") && !rstreq(how, "i")) { PyErr_SetString(PyExc_TypeError, "how argument must be \"u\" or \"i\""); return NULL; -- 2.7.4