diff mercurial/statprof.py @ 43088:0d612db7047c

py3: stop injecting pycompat.hasattr into modules I only found a single user of this pattern, probably because we use util.hasattr everywhere. Differential Revision: https://phab.mercurial-scm.org/D7008
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 06 Oct 2019 16:39:13 -0400
parents eef9a2d67051
children 74802979dd9d
line wrap: on
line diff
--- a/mercurial/statprof.py	Sun Oct 06 14:58:42 2019 -0400
+++ b/mercurial/statprof.py	Sun Oct 06 16:39:13 2019 -0400
@@ -168,7 +168,7 @@
         # a float
         if frequency:
             self.sample_interval = 1.0 / frequency
-        elif not hasattr(self, 'sample_interval'):
+        elif not pycompat.hasattr(self, 'sample_interval'):
             # default to 1000 Hz
             self.sample_interval = 1.0 / 1000.0
         else: