diff mercurial/statprof.py @ 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 99188a7c8717
children 8943c1352b6c
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