diff -r 6dbb8ae0a0b3 -r 976b6b2a1613 mercurial/lsprof.py --- a/mercurial/lsprof.py Fri Jun 23 18:23:42 2006 -0700 +++ b/mercurial/lsprof.py Fri Jun 23 19:20:22 2006 -0700 @@ -4,7 +4,13 @@ # small modifications made import sys -from _lsprof import Profiler, profiler_entry, profiler_subentry +try: + from _lsprof import Profiler, profiler_entry, profiler_subentry +except ImportError, inst: + import packagescan + if packagescan.scan_in_progress: + raise packagescan.SkipPackage('_lsprof not available') + raise __all__ = ['profile', 'Stats']