[Buildbot-commits] buildbot/buildbot/status words.py,1.31,1.32
Brian Warner
warner at users.sourceforge.net
Wed Dec 8 04:15:26 UTC 2004
Update of /cvsroot/buildbot/buildbot/buildbot/status
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5309/buildbot/status
Modified Files:
words.py
Log Message:
(IrcStatusBot.getBuilder): catch the KeyError that happens when you ask for
a non-existent Builder, and translate it into a UsageError.
Index: words.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/words.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- words.py 4 Dec 2004 21:20:18 -0000 1.31
+++ words.py 8 Dec 2004 04:15:23 -0000 1.32
@@ -103,8 +103,9 @@
return meth
def getBuilder(self, which):
- b = self.status.getBuilder(which)
- if not b:
+ try:
+ b = self.status.getBuilder(which)
+ except KeyError:
raise UsageError, "no such builder '%s'" % which
return b
More information about the Commits
mailing list