mercurial/lsprof.py
changeset 2497 976b6b2a1613
parent 2422 6aa75e77cafe
child 5992 30c40ba10963
equal deleted inserted replaced
2496:6dbb8ae0a0b3 2497:976b6b2a1613
     2 # it is not installed by distutils
     2 # it is not installed by distutils
     3 #
     3 #
     4 # small modifications made
     4 # small modifications made
     5 
     5 
     6 import sys
     6 import sys
     7 from _lsprof import Profiler, profiler_entry, profiler_subentry
     7 try:
       
     8     from _lsprof import Profiler, profiler_entry, profiler_subentry
       
     9 except ImportError, inst:
       
    10     import packagescan
       
    11     if packagescan.scan_in_progress:
       
    12         raise packagescan.SkipPackage('_lsprof not available')
       
    13     raise
     8 
    14 
     9 __all__ = ['profile', 'Stats']
    15 __all__ = ['profile', 'Stats']
    10 
    16 
    11 def profile(f, *args, **kwds):
    17 def profile(f, *args, **kwds):
    12     """XXX docstring"""
    18     """XXX docstring"""