summaryrefslogtreecommitdiffstats
path: root/pym/portage/exception.py
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-08-15 18:13:18 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-08-15 18:13:18 +0000
commit74ecc5568944b42e38cd99a4c07a6249bc9a56ed (patch)
tree4afdd58d9462b0d2efe71edfa43810e42766b5d2 /pym/portage/exception.py
parent6a454b2769795983b0f91d341632782b2596ef0b (diff)
downloadportage-74ecc5568944b42e38cd99a4c07a6249bc9a56ed.tar.gz
portage-74ecc5568944b42e38cd99a4c07a6249bc9a56ed.tar.bz2
portage-74ecc5568944b42e38cd99a4c07a6249bc9a56ed.zip
Prepare 308 messages to localization.
svn path=/main/trunk/; revision=14067
Diffstat (limited to 'pym/portage/exception.py')
-rw-r--r--pym/portage/exception.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/pym/portage/exception.py b/pym/portage/exception.py
index 6626fa3bf..f47937115 100644
--- a/pym/portage/exception.py
+++ b/pym/portage/exception.py
@@ -2,6 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
+from portage.localization import _
class PortageException(Exception):
"""General superclass for portage exceptions"""
@@ -95,10 +96,10 @@ class UnsupportedAPIException(PortagePackageException):
def __init__(self, cpv, eapi):
self.cpv, self.eapi = cpv, eapi
def __str__(self):
- msg = ("Unable to do any operations on '%s', since " + \
- "it's EAPI is higher than this portage version's. Please upgrade" + \
- " to a portage version that supports EAPI '%s'.") % \
- (self.cpv, str(self.eapi).lstrip("-"))
+ msg = _("Unable to do any operations on '%(cpv)s', since "
+ "it's EAPI is higher than this portage version's. Please upgrade"
+ " to a portage version that supports EAPI '%(eapi)s'.") % \
+ {"cpv": self.cpv, "eapi": str(self.eapi).lstrip("-")}
return msg