statprof: small if cleanup
authorBoris Feld <boris.feld@octobus.net>
Fri, 01 Jun 2018 12:10:34 +0200
changeset 38697 3c569172848d
parent 38696 89d93dd1a222
child 38698 6437e89b64d5
statprof: small if cleanup Explicitly testing for None to avoid comparison bugs.
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