# HG changeset patch # User Boris Feld # Date 2018-06-01 10:10:34 # Node ID 3c569172848d329a81b1420d7cd8a5549b48f25f # Parent 89d93dd1a22238cb1ac8462522c283f251f65fa9 statprof: small if cleanup Explicitly testing for None to avoid comparison bugs. diff --git a/mercurial/statprof.py b/mercurial/statprof.py --- a/mercurial/statprof.py +++ b/mercurial/statprof.py @@ -454,7 +454,8 @@ class DisplayFormats: 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