public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/resolver/
Date: Mon, 18 Mar 2013 20:58:03 +0000 (UTC)	[thread overview]
Message-ID: <1363640270.9c7dfbe244da364b07e8556580716155d3bd6a97.zmedico@gentoo> (raw)

commit:     9c7dfbe244da364b07e8556580716155d3bd6a97
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 18 20:57:50 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Mar 18 20:57:50 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9c7dfbe2

resolver/output: unicode(), not str() for python2

---
 pym/_emerge/resolver/output.py |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/pym/_emerge/resolver/output.py b/pym/_emerge/resolver/output.py
index 9e383e2..8072c1f 100644
--- a/pym/_emerge/resolver/output.py
+++ b/pym/_emerge/resolver/output.py
@@ -34,7 +34,9 @@ from _emerge.show_invalid_depstring_notice import show_invalid_depstring_notice
 
 if sys.hexversion >= 0x3000000:
 	basestring = str
-
+	_unicode = str
+else:
+	_unicode = unicode
 
 class Display(object):
 	"""Formats and outputs the depgrah supplied it for merge/re-merge, etc.
@@ -84,16 +86,16 @@ class Display(object):
 			addl = "%s     " % (colorize(self.blocker_style, "B"),)
 		addl += self.empty_space_in_brackets()
 		self.resolved = dep_expand(
-			str(pkg.atom).lstrip("!"), mydb=self.vardb,
+			_unicode(pkg.atom).lstrip("!"), mydb=self.vardb,
 			settings=self.pkgsettings
 			)
 		if self.conf.columns and self.conf.quiet:
-			addl += " " + colorize(self.blocker_style, str(self.resolved))
+			addl += " " + colorize(self.blocker_style, _unicode(self.resolved))
 		else:
 			addl = "[%s %s] %s%s" % \
 				(colorize(self.blocker_style, "blocks"),
 				addl, self.indent,
-				colorize(self.blocker_style, str(self.resolved))
+				colorize(self.blocker_style, _unicode(self.resolved))
 				)
 		block_parents = self.conf.blocker_parents.parent_nodes(pkg)
 		block_parents = set([pnode[2] for pnode in block_parents])
@@ -101,7 +103,7 @@ class Display(object):
 		if self.resolved != pkg[2]:
 			addl += colorize(self.blocker_style,
 				" (\"%s\" is blocking %s)") % \
-				(str(pkg.atom).lstrip("!"), block_parents)
+				(_unicode(pkg.atom).lstrip("!"), block_parents)
 		else:
 			addl += colorize(self.blocker_style,
 				" (is blocking %s)") % block_parents
@@ -308,7 +310,7 @@ class Display(object):
 				depstr, = db.aux_get(pkg.cpv,
 					["SRC_URI"], myrepo=pkg.repo)
 				show_invalid_depstring_notice(
-					pkg, depstr, str(e))
+					pkg, depstr, _unicode(e))
 				raise
 			except SignatureException:
 				# missing/invalid binary package SIZE signature
@@ -429,7 +431,7 @@ class Display(object):
 			ver_str = self._append_slot(ver_str, pkg, pkg_info)
 			ver_str = self._append_repository(ver_str, pkg, pkg_info)
 		if self.conf.quiet:
-			myprint = str(pkg_info.attr_display) + " " + self.indent + \
+			myprint = _unicode(pkg_info.attr_display) + " " + self.indent + \
 				self.pkgprint(pkg_info.cp, pkg_info)
 			myprint = myprint+darkblue(" "+ver_str)+" "
 			myprint = myprint+pkg_info.oldbest
@@ -468,7 +470,7 @@ class Display(object):
 			ver_str = self._append_slot(ver_str, pkg, pkg_info)
 			ver_str = self._append_repository(ver_str, pkg, pkg_info)
 		if self.conf.quiet:
-			myprint = str(pkg_info.attr_display) + " " + self.indent + \
+			myprint = _unicode(pkg_info.attr_display) + " " + self.indent + \
 				self.pkgprint(pkg_info.cp, pkg_info)
 			myprint = myprint+" "+green(ver_str)+" "
 			myprint = myprint+pkg_info.oldbest


             reply	other threads:[~2013-03-18 20:58 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-18 20:58 Zac Medico [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-10-04  0:30 [gentoo-commits] proj/portage:master commit in: pym/_emerge/resolver/ Zac Medico
2016-12-19  5:15 Zac Medico
2016-05-27  8:33 Alexander Berntsen
2015-08-03 18:36 Zac Medico
2015-07-29 18:44 Zac Medico
2014-12-13 14:51 Arfrever Frehtes Taifersar Arahesis
2014-08-23  7:21 Zac Medico
2014-02-23 21:38 Sebastian Luther
2014-02-05 19:42 Sebastian Luther
2014-02-05 19:42 Sebastian Luther
2013-03-20 20:32 Zac Medico
2013-03-20 19:23 Zac Medico
2013-03-18 21:28 Zac Medico
2013-03-18 21:12 Zac Medico
2013-02-28  0:25 Zac Medico
2013-02-28  0:12 Zac Medico
2013-02-27 23:39 Zac Medico
2013-01-24  1:18 Zac Medico
2012-10-15 17:17 Arfrever Frehtes Taifersar Arahesis
2012-10-15  4:06 Arfrever Frehtes Taifersar Arahesis
2012-10-14 20:02 Arfrever Frehtes Taifersar Arahesis
2012-10-14 19:54 Arfrever Frehtes Taifersar Arahesis
2012-10-14  2:53 Zac Medico
2012-10-14  2:44 Zac Medico
2012-09-25  2:00 Zac Medico
2012-09-24  3:12 Zac Medico
2012-09-14  2:08 Zac Medico
2012-09-14  1:04 Zac Medico
2012-06-27 21:56 Zac Medico
2012-06-23  6:00 Zac Medico
2012-06-21  4:43 Zac Medico
2012-06-20 21:24 Zac Medico
2012-04-05 19:37 Zac Medico
2012-03-22 19:00 Zac Medico
2012-03-22 18:10 Zac Medico
2012-03-22 17:38 Zac Medico
2012-03-22 17:15 Zac Medico
2012-03-13 17:22 Zac Medico
2012-01-28  2:23 Arfrever Frehtes Taifersar Arahesis
2012-01-28  1:51 Arfrever Frehtes Taifersar Arahesis
2012-01-23 17:13 Arfrever Frehtes Taifersar Arahesis
2012-01-22  3:57 Arfrever Frehtes Taifersar Arahesis
2012-01-22  3:47 Arfrever Frehtes Taifersar Arahesis
2011-11-18  5:58 Zac Medico
2011-11-18  1:43 Zac Medico
2011-11-07 18:34 Zac Medico
2011-11-07  7:37 Zac Medico
2011-10-19 21:32 Zac Medico
2011-10-19 21:25 Zac Medico
2011-10-02 20:11 Zac Medico
2011-09-17 17:51 Zac Medico
2011-07-27 10:34 Zac Medico
2011-07-10 13:35 Zac Medico
2011-07-10 12:23 Zac Medico
2011-07-10 10:41 Zac Medico
2011-07-10  1:58 Zac Medico
2011-07-10  1:31 Zac Medico
2011-07-09 22:24 Zac Medico
2011-06-21  8:15 Zac Medico
2011-06-11  1:31 Zac Medico
2011-03-15 22:59 Zac Medico

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1363640270.9c7dfbe244da364b07e8556580716155d3bd6a97.zmedico@gentoo \
    --to=zmedico@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox