summaryrefslogtreecommitdiffstats
path: root/pym/portage_exception.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-10-05 02:54:19 +0000
committerZac Medico <zmedico@gentoo.org>2007-10-05 02:54:19 +0000
commit3398f914dcbf7f49439616b9ac9d3fd72f500bf3 (patch)
treeea406b8d80c2bfca45c9417c9e19f008f8b2c39a /pym/portage_exception.py
parent7ad0aa456700abec1a8f0ccbefe9ab14189c25ab (diff)
downloadportage-3398f914dcbf7f49439616b9ac9d3fd72f500bf3.tar.gz
portage-3398f914dcbf7f49439616b9ac9d3fd72f500bf3.tar.bz2
portage-3398f914dcbf7f49439616b9ac9d3fd72f500bf3.zip
Fix UnsupportedAPIException.__str__() to strip the leading negative
sign (-) from the EAPI, to prevent confusion. (trunk r7912) svn path=/main/branches/2.1.2/; revision=7934
Diffstat (limited to 'pym/portage_exception.py')
-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