comparison mercurial/lsprof.py @ 43089:c59eb1560c44

py3: manually import getattr where it is needed The march continues. Differential Revision: https://phab.mercurial-scm.org/D7009
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 06 Oct 2019 16:55:18 -0400
parents 687b865b95ad
children d783f945a701
comparison
equal deleted inserted replaced
43088:0d612db7047c 43089:c59eb1560c44
1 from __future__ import absolute_import, print_function 1 from __future__ import absolute_import, print_function
2 2
3 import _lsprof 3 import _lsprof
4 import sys 4 import sys
5
6 from .pycompat import getattr
5 7
6 Profiler = _lsprof.Profiler 8 Profiler = _lsprof.Profiler
7 9
8 # PyPy doesn't expose profiler_entry from the module. 10 # PyPy doesn't expose profiler_entry from the module.
9 profiler_entry = getattr(_lsprof, 'profiler_entry', None) 11 profiler_entry = getattr(_lsprof, 'profiler_entry', None)