Show More
@@ -8,6 +8,7 b'' | |||
|
8 | 8 | from __future__ import absolute_import |
|
9 | 9 | |
|
10 | 10 | from . import ( |
|
11 | error, | |
|
11 | 12 | pycompat, |
|
12 | 13 | util, |
|
13 | 14 | ) |
@@ -50,6 +51,10 b' class _funcregistrarbase(object):' | |||
|
50 | 51 | def _doregister(self, func, decl, *args, **kwargs): |
|
51 | 52 | name = self._getname(decl) |
|
52 | 53 | |
|
54 | if name in self._table: | |
|
55 | msg = 'duplicate registration for name: "%s"' % name | |
|
56 | raise error.ProgrammingError(msg) | |
|
57 | ||
|
53 | 58 | if func.__doc__ and not util.safehasattr(func, '_origdoc'): |
|
54 | 59 | doc = func.__doc__.strip() |
|
55 | 60 | func._origdoc = doc |
General Comments 0
You need to be logged in to leave comments.
Login now