diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2009-09-28 14:50:33 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2009-09-28 14:50:33 +0300 |
commit | f0e9245660100d3ce41692889899844f42feb7a4 (patch) | |
tree | 9511b87c6e3fa9018ece5b20f4ce39a81ebd8023 /python/header-py.c | |
parent | 90042df3428414bf5f68cb6db7aed208d6455b96 (diff) | |
download | librpm-tizen-f0e9245660100d3ce41692889899844f42feb7a4.tar.gz librpm-tizen-f0e9245660100d3ce41692889899844f42feb7a4.tar.bz2 librpm-tizen-f0e9245660100d3ce41692889899844f42feb7a4.zip |
Implement rpmreadHeaderListFromFile() in python instead of C
Diffstat (limited to 'python/header-py.c')
-rw-r--r-- | python/header-py.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/python/header-py.c b/python/header-py.c index 521f5b6b7..755252eb3 100644 --- a/python/header-py.c +++ b/python/header-py.c @@ -576,29 +576,6 @@ PyObject * rpmHeaderFromFD(PyObject * self, PyObject * args, PyObject * kwds) return list; } -PyObject * rpmHeaderFromFile(PyObject * self, PyObject * args, PyObject *kwds) -{ - char * filespec; - FD_t fd; - PyObject * list; - char * kwlist[] = {"file", NULL}; - - if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", kwlist, &filespec)) - return NULL; - - fd = Fopen(filespec, "r.fdio"); - - if (!fd) { - PyErr_SetFromErrno(pyrpmError); - return NULL; - } - - list = rpmReadHeaders (fd); - Fclose(fd); - - return list; -} - /** * This assumes the order of list matches the order of the new headers, and * throws an exception if that isn't true. |