summaryrefslogtreecommitdiff
path: root/python/rpm/__init__.py
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/rpm/__init__.py
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/rpm/__init__.py')
-rw-r--r--python/rpm/__init__.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/python/rpm/__init__.py b/python/rpm/__init__.py
index e70602574..bbce2368b 100644
--- a/python/rpm/__init__.py
+++ b/python/rpm/__init__.py
@@ -16,3 +16,10 @@ _RPMVSF_NOSIGNATURES = _rpm._RPMVSF_NOSIGNATURES
def headerLoad(*args, **kwds):
warnings.warn("Use rpm.hdr() instead.", DeprecationWarning, stacklevel=2)
return hdr(*args, **kwds)
+
+def readHeaderListFromFile(path):
+ f = open(path)
+ hlist = readHeaderListFromFD(f)
+ f.close()
+ return hlist
+