Mercurial > hg > mercurial-crew
diff mercurial/error.py @ 24192:dcfdfd63bde4
error.LookupError: rename 'message' property to something else
At least some installs of Python 2.6+ complain with:
mercurial/error.py:26: DeprecationWarning: BaseException.message has been
deprecated as of Python 2.6
This patch renames the property away from 'message' so that Python no longer
complains.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Wed, 18 Feb 2015 16:45:16 -0800 |
parents | a450e0a2ba0a |
children | 903c7e8c97ad |
line wrap: on
line diff
--- a/mercurial/error.py +++ b/mercurial/error.py @@ -23,7 +23,9 @@ def __init__(self, name, index, message): self.name = name self.index = index - self.message = message + # this can't be called 'message' because at least some installs of + # Python 2.6+ complain about the 'message' property being deprecated + self.lookupmessage = message if isinstance(name, str) and len(name) == 20: from node import short name = short(name)