changeset 34128 | 82bd4c5a81e5 |
parent 34088 | a763c891f36e |
child 34186 | f7c9c5d8c7f4 |
--- a/mercurial/extensions.py Tue Sep 12 09:13:02 2017 -0700 +++ b/mercurial/extensions.py Sun Sep 10 23:37:14 2017 +0900 @@ -333,7 +333,10 @@ def _updatewrapper(wrap, origfn, unboundwrapper): '''Copy and add some useful attributes to wrapper''' - wrap.__name__ = origfn.__name__ + try: + wrap.__name__ = origfn.__name__ + except AttributeError: + pass wrap.__module__ = getattr(origfn, '__module__') wrap.__doc__ = getattr(origfn, '__doc__') wrap.__dict__.update(getattr(origfn, '__dict__', {}))