Fix traceback if supybot.errors.noCapability does not contain %s.

This commit is contained in:
Valentin Lorentz 2013-03-24 07:51:55 +00:00
parent 574d73c14e
commit 9a23ba1cfa

View File

@ -517,7 +517,10 @@ class RichReplyMethods(object):
v = self._getConfig(conf.supybot.replies.genericNoCapability) v = self._getConfig(conf.supybot.replies.genericNoCapability)
else: else:
v = self._getConfig(conf.supybot.replies.noCapability) v = self._getConfig(conf.supybot.replies.noCapability)
try:
v %= capability v %= capability
except TypeError: # No %s in string
pass
s = self.__makeReply(v, s) s = self.__makeReply(v, s)
if s: if s:
return self._error(s, **kwargs) return self._error(s, **kwargs)