Fixed escaping ValueError in soundex.

This commit is contained in:
Jeremy Fincher 2003-10-22 20:09:45 +00:00
parent 9a5cb77fe4
commit 84690d56c9
2 changed files with 4 additions and 1 deletions

View File

@ -492,7 +492,7 @@ class Fun(callbacks.Privmsg):
try:
length = int(length)
except ValueError:
irc.error(msg, '%r isn\'t a valid length.')
irc.error(msg, '%r isn\'t a valid length.' % length)
return
else:
length = 4

View File

@ -42,7 +42,10 @@ class FunTest(PluginTestCase, PluginDocumentation):
self.assertNotError('lithp meghan sweeney')
self.assertNotError('objects')
self.assertNotError('levenshtein Python Perl')
def testSoundex(self):
self.assertNotError('soundex jemfinch')
self.assertNotRegexp('soundex foobar 3:30', 'ValueError')
def testJeffk(self):
for i in range(100):