summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-10-12 15:15:39 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-10-12 15:15:39 +0300
commit181a3ac6a5b2d2017482da6327e0fc7a84e41c5e (patch)
treecd166430c863aae770aba3ff4603773e04e57bf0 /python
parent597973befe1587decf9e1a069653b87e05be1a01 (diff)
downloadlibrpm-tizen-181a3ac6a5b2d2017482da6327e0fc7a84e41c5e.tar.gz
librpm-tizen-181a3ac6a5b2d2017482da6327e0fc7a84e41c5e.tar.bz2
librpm-tizen-181a3ac6a5b2d2017482da6327e0fc7a84e41c5e.zip
Raise exception in the converter, not caller
Diffstat (limited to 'python')
-rw-r--r--python/header-py.c1
-rw-r--r--python/rpmtd-py.c1
2 files changed, 1 insertions, 1 deletions
diff --git a/python/header-py.c b/python/header-py.c
index a06412775..5ca920e84 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 a84cab32e..1911e2535 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;
}
}