diff options
Diffstat (limited to 'python')
-rw-r--r-- | python/header-py.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/header-py.c b/python/header-py.c index 9b7070485..ec6a325fe 100644 --- a/python/header-py.c +++ b/python/header-py.c @@ -673,14 +673,14 @@ PyObject * rpmReadHeaders (FD_t fd) PyObject * rpmHeaderFromFD(PyObject * self, PyObject * args, PyObject * kwds) { FD_t fd; - int fileno; + PyObject *fo; PyObject * list; char * kwlist[] = {"fd", NULL}; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "i", kwlist, &fileno)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", kwlist, &fo)) return NULL; - fd = fdDup(fileno); + if ((fd = rpmFdFromPyObject(fo)) == NULL) return NULL; list = rpmReadHeaders (fd); Fclose(fd); |