Mercurial > hg
changeset 38697:3c569172848d
statprof: small if cleanup
Explicitly testing for None to avoid comparison bugs.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 01 Jun 2018 12:10:34 +0200 |
parents | 89d93dd1a222 |
children | 6437e89b64d5 |
files | mercurial/statprof.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/statprof.py Sat Jul 14 02:10:43 2018 +0200 +++ b/mercurial/statprof.py Fri Jun 01 12:10:34 2018 +0200 @@ -454,7 +454,8 @@ def display(fp=None, format=3, data=None, **kwargs): '''Print statistics, either to stdout or the given file object.''' - data = data or state + if data is None: + data = state if fp is None: import sys