summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/rpmte-py.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/rpmte-py.c b/python/rpmte-py.c
index f15824780..2204a5281 100644
--- a/python/rpmte-py.c
+++ b/python/rpmte-py.c
@@ -114,7 +114,11 @@ rpmte_PkgFileSize(rpmteObject * s, PyObject * unused)
static PyObject *
rpmte_Parent(rpmteObject * s, PyObject * unused)
{
- return Py_BuildValue("i", rpmteParent(s->te));
+ rpmte parent = rpmteParent(s->te);
+ if (parent)
+ return rpmte_Wrap(&rpmte_Type, parent);
+
+ Py_RETURN_NONE;
}
static PyObject * rpmte_Failed(rpmteObject * s, PyObject * unused)