From 71235479ab208318dff391420f9695f5cfaa9594 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 18 Jan 2013 13:33:08 -0800 Subject: Use unicode_literals more. This helps to ensure consistent results, regardless of whether we're using Python 2 or Python 3. --- pym/portage/repository/config.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'pym/portage/repository') 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() -- cgit v1.2.3-1-g7c22