projects
/
platform
/
upstream
/
rpm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6938386
)
Remove unnecessary header type checking
author
Panu Matilainen
<pmatilai@redhat.com>
Wed, 23 Sep 2009 14:44:07 +0000
(17:44 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Wed, 23 Sep 2009 14:44:07 +0000
(17:44 +0300)
- the type is already validated by PyArg_ParseTupleAndKeywords(),
no need to doublecheck
python/rpmts-py.c
patch
|
blob
|
history
diff --git
a/python/rpmts-py.c
b/python/rpmts-py.c
index
ab4f5b9
..
ed33ab3
100644
(file)
--- 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;