summaryrefslogtreecommitdiffstats
path: root/pym/portage/exception.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-10-10 20:15:43 +0000
committerZac Medico <zmedico@gentoo.org>2008-10-10 20:15:43 +0000
commit7bb5894209190a2fa20c3899156a92a3313c884e (patch)
tree8941d188aa9e664927099b54254d8b0ce4d98f2a /pym/portage/exception.py
parent462b4508a6914422a98e43b67e5faf630eafb4e3 (diff)
downloadportage-7bb5894209190a2fa20c3899156a92a3313c884e.tar.gz
portage-7bb5894209190a2fa20c3899156a92a3313c884e.tar.bz2
portage-7bb5894209190a2fa20c3899156a92a3313c884e.zip
Create a new AmbiguousPackageName exception to raise from
portage.cpv_expand(). It inherits from ValueError, for backward compatibility with calling code that already handles ValueError. svn path=/main/trunk/; revision=11670
Diffstat (limited to 'pym/portage/exception.py')
-rw-r--r--pym/portage/exception.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pym/portage/exception.py b/pym/portage/exception.py
index ff34993a6..6626fa3bf 100644
--- a/pym/portage/exception.py
+++ b/pym/portage/exception.py
@@ -67,6 +67,13 @@ class ReadOnlyFileSystem(PortageException):
class CommandNotFound(PortageException):
"""A required binary was not available or executable"""
+class AmbiguousPackageName(ValueError, PortageException):
+ """Raised by portage.cpv_expand() when the package name is ambiguous due
+ to the existence of multiple matches in different categories. This inherits
+ from ValueError, for backward compatibility with calling code that already
+ handles ValueError."""
+ def __str__(self):
+ return ValueError.__str__(self)
class PortagePackageException(PortageException):
"""Malformed or missing package data"""