From: Panu Matilainen Date: Mon, 12 Oct 2009 12:15:39 +0000 (+0300) Subject: Raise exception in the converter, not caller X-Git-Tag: rpm-4.8.0-beta1~106 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=181a3ac6a5b2d2017482da6327e0fc7a84e41c5e;p=platform%2Fupstream%2Frpm.git Raise exception in the converter, not caller --- diff --git a/python/header-py.c b/python/header-py.c index a064127..5ca920e 100644 --- a/python/header-py.c +++ b/python/header-py.c @@ -468,7 +468,6 @@ static int hdr_ass_subscript(hdrObject *s, PyObject *key, PyObject *value) } else if (rpmtdFromPyObject(value, &td)) { headerPut(s->h, td, HEADERPUT_DEFAULT); } else { - PyErr_SetString(PyExc_TypeError, "rpm.td type expected"); return -1; } return 0; diff --git a/python/rpmtd-py.c b/python/rpmtd-py.c index a84cab3..1911e25 100644 --- a/python/rpmtd-py.c +++ b/python/rpmtd-py.c @@ -206,6 +206,7 @@ int rpmtdFromPyObject(PyObject *obj, rpmtd *td) *td = &(((rpmtdObject *)obj)->td); return 1; } else { + PyErr_SetString(PyExc_TypeError, "rpm.td type expected"); return 0; } }