mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Removed SimpleTool; not needed for multiple hooks
This commit is contained in:
parent
7a319e36c5
commit
f1dd9dbdaa
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user