Removed SimpleTool; not needed for multiple hooks

This commit is contained in:
Seth House 2012-11-14 09:00:33 -07:00
parent 7a319e36c5
commit f1dd9dbdaa

View File

@ -50,25 +50,6 @@ def fmt_lowdata(data):
return lowdata
class SimpleTool(cherrypy.Tool):
'''
http://ionrock.org/better-cherrypy-tools.html
'''
def __init__(self, point=None, callable=None):
self._point = point
self._name = None
self._priority = 50
self._setargs()
def _setup(self):
conf = self._merged_args()
hooks = cherrypy.request.hooks
for hookpoint in cherrypy._cprequest.hookpoints:
if hasattr(self, hookpoint):
func = getattr(self, hookpoint)
p = getattr(func, 'priority', self._priority)
hooks.attach(hookpoint, func, priority=p, **conf)
def salt_auth_tool(default=False):
ignore_urls = ('/login',)
sid = (cherrypy.session.get('token', None) or