diff options
author | Gustavo Picon <tabo@tabo.pe> | 2014-01-12 20:04:16 -0500 |
---|---|---|
committer | Gustavo Picon <tabo@tabo.pe> | 2014-01-12 20:04:16 -0500 |
commit | 89b473735d830a1eda091da5f726ea74a110f7ea (patch) | |
tree | 07c1716a9c20b3366ce70d1b8932a44eb69e8ea1 /cherrypy/lib/profiler.py | |
parent | ebbf43f5ff35c39d5f936b47a5a68d54eaaf27cf (diff) | |
download | cherrypy-git-89b473735d830a1eda091da5f726ea74a110f7ea.tar.gz |
More PEP8 work.
Diffstat (limited to 'cherrypy/lib/profiler.py')
-rw-r--r-- | cherrypy/lib/profiler.py | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/cherrypy/lib/profiler.py b/cherrypy/lib/profiler.py index 536ad217..5dac386e 100644 --- a/cherrypy/lib/profiler.py +++ b/cherrypy/lib/profiler.py @@ -35,7 +35,8 @@ module from the command line, it will call ``serve()`` for you. def new_func_strip_path(func_name): - """Make profiler output more readable by adding ``__init__`` modules' parents""" + """Make profiler output more readable by adding `__init__` modules' parents + """ filename, line, name = func_name if filename.endswith("__init__.py"): return os.path.basename(filename[:-12]) + filename[-12:], line, name @@ -126,7 +127,8 @@ class Profiler(object): runs = self.statfiles() runs.sort() for i in runs: - yield "<a href='report?filename=%s' target='main'>%s</a><br />" % (i, i) + yield "<a href='report?filename=%s' target='main'>%s</a><br />" % ( + i, i) menu.exposed = True def report(self, filename): @@ -170,9 +172,11 @@ class make_app: """ if profile is None or pstats is None: - msg = ("Your installation of Python does not have a profile module. " - "If you're on Debian, try `sudo apt-get install python-profiler`. " - "See http://www.cherrypy.org/wiki/ProfilingOnDebian for details.") + msg = ("Your installation of Python does not have a profile " + "module. If you're on Debian, try " + "`sudo apt-get install python-profiler`. " + "See http://www.cherrypy.org/wiki/ProfilingOnDebian " + "for details.") warnings.warn(msg) self.nextapp = nextapp @@ -194,8 +198,10 @@ class make_app: def serve(path=None, port=8080): if profile is None or pstats is None: msg = ("Your installation of Python does not have a profile module. " - "If you're on Debian, try `sudo apt-get install python-profiler`. " - "See http://www.cherrypy.org/wiki/ProfilingOnDebian for details.") + "If you're on Debian, try " + "`sudo apt-get install python-profiler`. " + "See http://www.cherrypy.org/wiki/ProfilingOnDebian " + "for details.") warnings.warn(msg) import cherrypy |