From f1dd9dbdaa8f6661dd3feb76869f9dc6f38e48bb Mon Sep 17 00:00:00 2001 From: Seth House Date: Wed, 14 Nov 2012 09:00:33 -0700 Subject: [PATCH] Removed SimpleTool; not needed for multiple hooks --- saltapi/netapi/rest_cherrypy.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/saltapi/netapi/rest_cherrypy.py b/saltapi/netapi/rest_cherrypy.py index d4713ccac9..630588dee6 100644 --- a/saltapi/netapi/rest_cherrypy.py +++ b/saltapi/netapi/rest_cherrypy.py @@ -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