Prevent traceback if supybot.replies.genericNoCapability is empty.

This commit is contained in:
Valentin Lorentz 2013-02-02 19:47:14 +01:00
parent 05d23d1a06
commit 13a633eea4

View File

@ -519,7 +519,8 @@ class RichReplyMethods(object):
v = self._getConfig(conf.supybot.replies.noCapability)
v %= capability
s = self.__makeReply(v, s)
return self._error(s, **kwargs)
if s:
return self._error(s, **kwargs)
else:
log.warning('Denying %s for some unspecified capability '
'(or a default).', self.msg.prefix)