# HG changeset patch # User Boris Feld # Date 1527847834 -7200 # Node ID 3c569172848d329a81b1420d7cd8a5549b48f25f # Parent 89d93dd1a22238cb1ac8462522c283f251f65fa9 statprof: small if cleanup Explicitly testing for None to avoid comparison bugs. diff -r 89d93dd1a222 -r 3c569172848d mercurial/statprof.py --- 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