mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-02 15:44:06 +01:00
Fixed escaping ValueError in soundex.
This commit is contained in:
parent
5c1fc0114d
commit
9a5cb77fe4
@ -489,7 +489,11 @@ class Fun(callbacks.Privmsg):
|
|||||||
"""
|
"""
|
||||||
(s, length) = privmsgs.getArgs(args, optional=1)
|
(s, length) = privmsgs.getArgs(args, optional=1)
|
||||||
if length:
|
if length:
|
||||||
|
try:
|
||||||
length = int(length)
|
length = int(length)
|
||||||
|
except ValueError:
|
||||||
|
irc.error(msg, '%r isn\'t a valid length.')
|
||||||
|
return
|
||||||
else:
|
else:
|
||||||
length = 4
|
length = 4
|
||||||
irc.reply(msg, utils.soundex(s, length))
|
irc.reply(msg, utils.soundex(s, length))
|
||||||
|
Loading…
Reference in New Issue
Block a user