Add MpdHandler patterns to docstrings automatically

This commit is contained in:
Stein Magnus Jodal 2010-02-21 23:32:41 +01:00
parent b67a58eb6d
commit f105b85428

View File

@ -15,6 +15,9 @@ def register(pattern):
raise ValueError(u'Tried to redefine handler for %s with %s' % (
pattern, func))
_request_handlers[pattern] = func
if func.__doc__ is None:
func.__doc__ = ''
func.__doc__ += '\n\n- **Pattern:** ``%s``' % pattern
return func
return decorator