In Package._validate_deps(), force unicode format string in
authorZac Medico <zmedico@gentoo.org>
Wed, 15 Sep 2010 06:32:43 +0000 (23:32 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 15 Sep 2010 06:32:43 +0000 (23:32 -0700)
check_required_use() exception handling (for python-2.x safety).

pym/_emerge/Package.py

index 61a976530fab6a4e88b029292c04fdbbbb92a76e..0db16fb2f9d9d9bc720ec4319d9c65be441991cd 100644 (file)
@@ -125,8 +125,11 @@ class Package(Task):
                                        check_required_use(v, (),
                                                self.iuse.is_valid_flag)
                                except InvalidDependString as e:
+                                       # Force unicode format string for python-2.x safety,
+                                       # ensuring that PortageException.__unicode__() is used
+                                       # when necessary.
                                        self._invalid_metadata(k + ".syntax",
-                                               "%s: %s" % (k, e))
+                                               _unicode_decode("%s: %s") % (k, e))
 
                k = 'SRC_URI'
                v = self.metadata.get(k)