diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2014-09-13 22:31:23 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2014-09-13 22:31:23 -0400 |
commit | ef3265ef3387e119cf3caf5d76ace3056dae2c39 (patch) | |
tree | dbb25c11d3c928dbad88ab9e7a0230b441a80154 | |
parent | c6f9a75e83081b04a04004b4be2db3fcf95141a2 (diff) | |
download | cherrypy-ef3265ef3387e119cf3caf5d76ace3056dae2c39.tar.gz |
Extract variable for nicer indentation
-rw-r--r-- | cherrypy/lib/cptools.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/cherrypy/lib/cptools.py b/cherrypy/lib/cptools.py index 1ab70ef4..4cba8b16 100644 --- a/cherrypy/lib/cptools.py +++ b/cherrypy/lib/cptools.py @@ -380,8 +380,8 @@ Message: %(error_msg)s path = request.path_info if path.endswith('login_screen'): if self.debug: - cherrypy.log('routing %r to login_screen' % - path, 'TOOLS.SESSAUTH') + msg = 'routing %(path)r to login_screen' % locals() + cherrypy.log(msg, 'TOOLS.SESSAUTH') response.body = self.login_screen() return True elif path.endswith('do_login'): @@ -391,20 +391,21 @@ Message: %(error_msg)s cherrypy.log('do_login requires POST', 'TOOLS.SESSAUTH') raise cherrypy.HTTPError(405) if self.debug: - cherrypy.log('routing %r to do_login' % path, 'TOOLS.SESSAUTH') + msg = 'routing %(path)r to do_login' % locals() + cherrypy.log(msg, 'TOOLS.SESSAUTH') return self.do_login(**request.params) elif path.endswith('do_logout'): if request.method != 'POST': response.headers['Allow'] = "POST" raise cherrypy.HTTPError(405) if self.debug: - cherrypy.log('routing %r to do_logout' % - path, 'TOOLS.SESSAUTH') + msg = 'routing %(path)r to do_logout' % locals() + cherrypy.log(msg, 'TOOLS.SESSAUTH') return self.do_logout(**request.params) else: if self.debug: - cherrypy.log('No special path, running do_check', - 'TOOLS.SESSAUTH') + msg = 'No special path, running do_check' + cherrypy.log(msg, 'TOOLS.SESSAUTH') return self.do_check() |