[python-meh][PATCH] Package's epoch returned by RPM is an integer
Vratislav Podzimek
vpodzime at redhat.com
Thu Mar 5 18:19:09 UTC 2015
(see http://fpaste.org/193606/18296142/ for the error)
We need to convert it into a unicode object since that's what's expected further
down the road and what every other filed of the PackageInfo namedtuple is.
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
meh/dump.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meh/dump.py b/meh/dump.py
index 157a6a3..28ea2f9 100644
--- a/meh/dump.py
+++ b/meh/dump.py
@@ -157,7 +157,7 @@ class ExceptionDump(object):
"{0}".format(file_))
pkg_info = PackageInfo(header["name"].decode("utf-8"), header["version"].decode("utf-8"),
header["release"].decode("utf-8"),
- header["epoch"].decode("utf-8") if header["epoch"] else "0",
+ u"%d" % header["epoch"] if header["epoch"] else "0",
header["arch"].decode("utf-8"))
# cuts the name from the NVR format: foo-blah-2.8.8-2.fc17.src.rpm
--
2.1.0
More information about the anaconda-patches
mailing list