DispatchState.dispatcher was only updated by RestController and actually is never used

This commit is contained in:
Alessandro Molina 2016-02-09 22:19:13 +01:00
parent b2778909b9
commit 740f131555
1 changed files with 1 additions and 3 deletions

View File

@ -99,11 +99,10 @@ class ObjectDispatcher(Dispatcher):
Also, this is the place where the controller is checked for
controller-level security.
"""
dispatcher = getattr(controller, '_dispatch', None)
if dispatcher is not None:
state.add_controller(current_path, controller)
state.dispatcher = controller
return dispatcher(state, remainder)
state.add_controller(current_path, controller)
return self._dispatch(state, remainder)
@ -137,7 +136,6 @@ class ObjectDispatcher(Dispatcher):
return r
elif m_type == 'default':
state.add_method(meth, m_remainder)
state.dispatcher = self
return state
# raise HTTPNotFound