diff options
author | Zac Medico <zmedico@gentoo.org> | 2013-01-18 13:33:08 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2013-01-18 13:36:47 -0800 |
commit | 71235479ab208318dff391420f9695f5cfaa9594 (patch) | |
tree | d36bc22802e3b13c8ca5dce4328540a287c6eb3f /pym/portage/repository/config.py | |
parent | 0d732def5d30b29ab2941f0c66919a3ec4e8eb02 (diff) | |
download | portage-71235479ab208318dff391420f9695f5cfaa9594.tar.gz portage-71235479ab208318dff391420f9695f5cfaa9594.tar.bz2 portage-71235479ab208318dff391420f9695f5cfaa9594.zip |
Use unicode_literals more.
This helps to ensure consistent results, regardless of whether we're
using Python 2 or Python 3.
Diffstat (limited to 'pym/portage/repository/config.py')
-rw-r--r-- | pym/portage/repository/config.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py index 3d29fd924..a1c1f79ce 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -1,6 +1,8 @@ -# Copyright 2010-2012 Gentoo Foundation +# Copyright 2010-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 +from __future__ import unicode_literals + import io import logging import warnings @@ -320,7 +322,7 @@ class RepoConfig(object): d = {} for k in self.__slots__: d[k] = getattr(self, k, None) - return _unicode_decode("%s") % (d,) + return "%s" % (d,) if sys.hexversion < 0x3000000: @@ -431,9 +433,9 @@ class RepoConfigLoader(object): try: read_file(f) except ParsingError as e: - writemsg(_unicode_decode( - _("!!! Error while reading repo config file: %s\n") - ) % e, noiselevel=-1) + writemsg( + _("!!! Error while reading repo config file: %s\n") % e, + noiselevel=-1) finally: if f is not None: f.close() |