Mercurial > hg
comparison mercurial/registrar.py @ 43115:4aa72cdf616f
py3: delete b'' prefix from safehasattr arguments
Differential Revision: https://phab.mercurial-scm.org/D7029
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sun, 06 Oct 2019 20:17:41 -0700 |
parents | 687b865b95ad |
children | 6a0e7bf73bb2 |
comparison
equal
deleted
inserted
replaced
43114:8197b395710e | 43115:4aa72cdf616f |
---|---|
63 | 63 |
64 if name in self._table: | 64 if name in self._table: |
65 msg = b'duplicate registration for name: "%s"' % name | 65 msg = b'duplicate registration for name: "%s"' % name |
66 raise error.ProgrammingError(msg) | 66 raise error.ProgrammingError(msg) |
67 | 67 |
68 if func.__doc__ and not util.safehasattr(func, b'_origdoc'): | 68 if func.__doc__ and not util.safehasattr(func, '_origdoc'): |
69 func._origdoc = func.__doc__.strip() | 69 func._origdoc = func.__doc__.strip() |
70 doc = pycompat.sysbytes(func._origdoc) | 70 doc = pycompat.sysbytes(func._origdoc) |
71 func.__doc__ = pycompat.sysstr(self._formatdoc(decl, doc)) | 71 func.__doc__ = pycompat.sysstr(self._formatdoc(decl, doc)) |
72 | 72 |
73 self._table[name] = func | 73 self._table[name] = func |