diff options
author | Per Øyvind Karlsen <proyvind@moondrake.org> | 2016-06-29 01:39:48 +0200 |
---|---|---|
committer | Per Øyvind Karlsen <proyvind@moondrake.org> | 2016-06-29 01:39:48 +0200 |
commit | 6b8d185a6389614ce30b829ac550d8fef13da91a (patch) | |
tree | 8f0758446a03d1ed9ce73370cbcd0994f9500577 /MgaRepo/rpmutil.py | |
parent | 14caa9cdcad9d8ef6a14e3f01da7fecadae836a0 (diff) | |
download | mgarepo-6b8d185a6389614ce30b829ac550d8fef13da91a.tar mgarepo-6b8d185a6389614ce30b829ac550d8fef13da91a.tar.gz mgarepo-6b8d185a6389614ce30b829ac550d8fef13da91a.tar.bz2 mgarepo-6b8d185a6389614ce30b829ac550d8fef13da91a.tar.xz mgarepo-6b8d185a6389614ce30b829ac550d8fef13da91a.zip |
convert bytes string to utf-8
Diffstat (limited to 'MgaRepo/rpmutil.py')
-rw-r--r-- | MgaRepo/rpmutil.py | 5 |
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 |