Mercurial > hg
changeset 24137: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 | 46d6cdfce4bf |
children | eabe44ec5af5 |
files | mercurial/error.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/error.py Thu Feb 19 19:32:06 2015 +0800 +++ b/mercurial/error.py Wed Feb 18 16:45:16 2015 -0800 @@ -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)