summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-10-04 02:56:00 +0000
committerZac Medico <zmedico@gentoo.org>2007-10-04 02:56:00 +0000
commit40d1d5b23e5c05923f49030e9e1671c506e6bc6b (patch)
tree2f9eb0869d5cc972fa8ec007241e520df88fe2e0
parent64ac544bc2077d17866a53b0acbc8babf462cbcf (diff)
downloadportage-40d1d5b23e5c05923f49030e9e1671c506e6bc6b.tar.gz
portage-40d1d5b23e5c05923f49030e9e1671c506e6bc6b.tar.bz2
portage-40d1d5b23e5c05923f49030e9e1671c506e6bc6b.zip
Fix UnsupportedAPIException.__str__() to strip the leading
negative sign (-) from the EAPI, to prevent confusion. svn path=/main/trunk/; revision=7912
-rw-r--r--pym/portage/exception.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage/exception.py b/pym/portage/exception.py
index 3d590a563..7802b8016 100644
--- a/pym/portage/exception.py
+++ b/pym/portage/exception.py
@@ -80,7 +80,11 @@ class UnsupportedAPIException(PortagePackageException):
def __init__(self, cpv, eapi):
self.cpv, self.eapi = cpv, eapi
def __str__(self):
- return "Unable to do any operations on '%s', due to the fact it's EAPI is higher then this portage versions. Please upgrade to a portage version that supports EAPI %s" % (self.cpv, self.eapi)
+ 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("-"))
+ return msg