summaryrefslogtreecommitdiff
path: root/python/header-py.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-09-28 14:50:33 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-09-28 14:50:33 +0300
commitf0e9245660100d3ce41692889899844f42feb7a4 (patch)
tree9511b87c6e3fa9018ece5b20f4ce39a81ebd8023 /python/header-py.c
parent90042df3428414bf5f68cb6db7aed208d6455b96 (diff)
downloadlibrpm-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.c23
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.