aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <proyvind@moondrake.org>2016-06-29 01:39:48 +0200
committerPer Øyvind Karlsen <proyvind@moondrake.org>2016-06-29 01:39:48 +0200
commit6b8d185a6389614ce30b829ac550d8fef13da91a (patch)
tree8f0758446a03d1ed9ce73370cbcd0994f9500577
parent14caa9cdcad9d8ef6a14e3f01da7fecadae836a0 (diff)
downloadmgarepo-6b8d185a6389614ce30b829ac550d8fef13da91a.tar
mgarepo-6b8d185a6389614ce30b829ac550d8fef13da91a.tar.gz
mgarepo-6b8d185a6389614ce30b829ac550d8fef13da91a.tar.bz2
mgarepo-6b8d185a6389614ce30b829ac550d8fef13da91a.tar.xz
mgarepo-6b8d185a6389614ce30b829ac550d8fef13da91a.zip
convert bytes string to utf-8
-rw-r--r--MgaRepo/rpmutil.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/MgaRepo/rpmutil.py b/MgaRepo/rpmutil.py
index 1d6a3cb..f3d1c5f 100644
--- a/MgaRepo/rpmutil.py
+++ b/MgaRepo/rpmutil.py
@@ -916,6 +916,9 @@ def get_pkg_tag(tag, path=os.path.curdir, subpkg=None):
raise Error("Subpkg must be the index number of a package,"\
"or None for source package")
- return header[tag]
+ if isinstance(header[tag],bytes):
+ return header[tag].decode("utf8")
+ else:
+ return header[tag]
# vim:et:ts=4:sw=4