diff --git a/src/commands.py b/src/commands.py index 2010a61a4..0886f5857 100644 --- a/src/commands.py +++ b/src/commands.py @@ -1039,9 +1039,10 @@ class Spec(object): return state def _wrap(f, specList=[], name=None, **kw): - assert hasattr(f, '__doc__') - f = internationalizeDocstring(f) 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) def newf(self, irc, msg, args, **kwargs): state = spec(irc, msg, args, stateAttrs={'cb': self, 'log': self.log})