mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-03 16:39:25 +01:00
Issue error message at plugin load if a command has no docstring.
This commit is contained in:
parent
18c671fc6c
commit
f82a7c7e17
@ -1039,9 +1039,10 @@ class Spec(object):
|
|||||||
return state
|
return state
|
||||||
|
|
||||||
def _wrap(f, specList=[], name=None, **kw):
|
def _wrap(f, specList=[], name=None, **kw):
|
||||||
assert hasattr(f, '__doc__')
|
|
||||||
f = internationalizeDocstring(f)
|
|
||||||
name = name or f.func_name
|
name = name or f.func_name
|
||||||
|
assert hasattr(f, '__doc__') and f.__doc__, \
|
||||||
|
'Command %r has no docstring.' % name
|
||||||
|
f = internationalizeDocstring(f)
|
||||||
spec = Spec(specList, **kw)
|
spec = Spec(specList, **kw)
|
||||||
def newf(self, irc, msg, args, **kwargs):
|
def newf(self, irc, msg, args, **kwargs):
|
||||||
state = spec(irc, msg, args, stateAttrs={'cb': self, 'log': self.log})
|
state = spec(irc, msg, args, stateAttrs={'cb': self, 'log': self.log})
|
||||||
|
Loading…
Reference in New Issue
Block a user