* [gentoo-commits] portage r13905 - main/trunk/pym/portage
@ 2009-08-04 19:40 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-08-04 19:40 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2009-08-04 19:40:57 +0000 (Tue, 04 Aug 2009)
New Revision: 13905
Modified:
main/trunk/pym/portage/dep.py
Log:
Bug #280269 - Fix Atom.__str__ so that it doesn't try to encode a unicode
string (resulting in UnicodeEncodeError). If an Atom instance is passed into
the constructor, just return the given instance.
Modified: main/trunk/pym/portage/dep.py
===================================================================
--- main/trunk/pym/portage/dep.py 2009-08-04 19:27:24 UTC (rev 13904)
+++ main/trunk/pym/portage/dep.py 2009-08-04 19:40:57 UTC (rev 13905)
@@ -494,6 +494,8 @@
identical instances when available.
"""
def __call__(cls, s):
+ if isinstance(s, Atom):
+ return s
instance = cls._atoms.get(s)
if instance is None:
instance = super(_AtomCache, cls).__call__(s)
@@ -620,7 +622,7 @@
return repr(self._str)
def __str__(self):
- return str(self._str)
+ return self._str
def endswith(self, *pargs, **kargs):
return self._str.endswith(*pargs, **kargs)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-08-04 19:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-04 19:40 [gentoo-commits] portage r13905 - main/trunk/pym/portage Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox