Mercurial > public > mercurial-scm > hg-stable
diff mercurial/lsprof.py @ 2497:976b6b2a1613
do not try to package lsprof if not available.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Fri, 23 Jun 2006 19:20:22 -0700 |
parents | 6aa75e77cafe |
children | 30c40ba10963 |
line wrap: on
line diff
--- 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']