diff options
author | Robert Brewer <fumanchu@aminus.org> | 2005-12-23 22:24:28 +0000 |
---|---|---|
committer | Robert Brewer <fumanchu@aminus.org> | 2005-12-23 22:24:28 +0000 |
commit | 222767993ab13f80fab7eeda0c28c07c68c2fc29 (patch) | |
tree | dbf850b143b0ba55c32ff52ecb904224a0f10140 /cherrypy/lib/profiler.py | |
parent | f4b5c379963b2b1b500d197e16dc50b4c8e21c96 (diff) | |
download | cherrypy-git-222767993ab13f80fab7eeda0c28c07c68c2fc29.tar.gz |
Oops. Debian is missing the pstats module too.
Diffstat (limited to 'cherrypy/lib/profiler.py')
-rw-r--r-- | cherrypy/lib/profiler.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cherrypy/lib/profiler.py b/cherrypy/lib/profiler.py index fb06606f..004221c0 100644 --- a/cherrypy/lib/profiler.py +++ b/cherrypy/lib/profiler.py @@ -38,13 +38,14 @@ def new_func_strip_path(func_name): if filename.endswith("__init__.py"): return os.path.basename(filename[:-12]) + filename[-12:], line, name return os.path.basename(filename), line, name -import pstats -pstats.func_strip_path = new_func_strip_path try: import profile + import pstats + pstats.func_strip_path = new_func_strip_path except ImportError: profile = None + pstats = None import warnings msg = ("Your installation of Python doesn't have a profile module. " "If you're on Debian, you can apt-get python2.4-profiler from " |