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. --- bin/portageq | 10 +++------- bin/repoman | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'bin') diff --git a/bin/portageq b/bin/portageq index ee776ef4f..826c92d12 100755 --- a/bin/portageq +++ b/bin/portageq @@ -2,7 +2,7 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -from __future__ import print_function +from __future__ import print_function, unicode_literals import signal import sys @@ -101,9 +101,7 @@ def has_version(argv): try: atom = portage.dep.Atom(argv[1], allow_repo=allow_repo, eapi=eapi) except portage.exception.InvalidAtom as e: - warnings.append( - portage._unicode_decode("QA Notice: %s: %s") % \ - ('has_version', e)) + warnings.append("QA Notice: %s: %s" % ('has_version', e)) atom = eval_atom_use(atom) if warnings: @@ -149,9 +147,7 @@ def best_version(argv): try: atom = portage.dep.Atom(argv[1], allow_repo=allow_repo, eapi=eapi) except portage.exception.InvalidAtom as e: - warnings.append( - portage._unicode_decode("QA Notice: %s: %s") % \ - ('best_version', e)) + warnings.append("QA Notice: %s: %s" % ('best_version', e)) atom = eval_atom_use(atom) if warnings: diff --git a/bin/repoman b/bin/repoman index 4c00d5bca..11f2b13bb 100755 --- a/bin/repoman +++ b/bin/repoman @@ -6,7 +6,7 @@ # Then, check to make sure deps are satisfiable (to avoid "can't find match for" problems) # that last one is tricky because multiple profiles need to be checked. -from __future__ import print_function +from __future__ import print_function, unicode_literals import calendar import codecs -- cgit v1.2.3-1-g7c22