[python-meh][PATCH] Package's epoch returned by RPM is an integer
Brian C. Lane
bcl at redhat.com
Fri Mar 6 21:14:25 UTC 2015
On Thu, Mar 05, 2015 at 07:19:09PM +0100, Vratislav Podzimek wrote:
> (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
Ack
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
More information about the anaconda-patches
mailing list