Mercurial > hg-stable
changeset 22447:2642ce9be6ef
formatter: correct bool testing which should be __nonzero__ in Python 2
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 17 Sep 2014 00:31:03 +0900 |
parents | 054ec0212718 |
children | 8afaf7cef35a |
files | mercurial/formatter.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/formatter.py Mon Sep 15 16:07:54 2014 -0400 +++ b/mercurial/formatter.py Wed Sep 17 00:31:03 2014 +0900 @@ -16,7 +16,7 @@ self._style = opts.get("style") self._template = opts.get("template") self._item = None - def __bool__(self): + def __nonzero__(self): '''return False if we're not doing real templating so we can skip extra work''' return True @@ -51,7 +51,7 @@ '''the default text output scheme''' def __init__(self, ui, topic, opts): baseformatter.__init__(self, ui, topic, opts) - def __bool__(self): + def __nonzero__(self): return False def startitem(self): pass