aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/bugdir.py
diff options
context:
space:
mode:
Diffstat (limited to 'libbe/bugdir.py')
-rw-r--r--libbe/bugdir.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/libbe/bugdir.py b/libbe/bugdir.py
index e9854c9..1bb307c 100644
--- a/libbe/bugdir.py
+++ b/libbe/bugdir.py
@@ -63,6 +63,12 @@ class MultipleBugMatches(ValueError):
self.shortname = shortname
self.matches = matches
+class NoBugMatches(KeyError):
+ def __init__(self, shortname):
+ msg = "No bug matches %s" % shortname
+ KeyError.__init__(self, msg)
+ self.shortname = shortname
+
class DiskAccessRequired (Exception):
def __init__(self, goal):
msg = "Cannot %s without accessing the disk" % goal
@@ -595,7 +601,7 @@ settings easy. Don't set this attribute. Set .rcs instead, and
raise MultipleBugMatches(shortname, matches)
if len(matches) == 1:
return self.bug_from_uuid(matches[0])
- raise KeyError("No bug matches %s" % shortname)
+ raise NoBugMatches(shortname)
def bug_from_uuid(self, uuid):
if not self.has_bug(uuid):