action _launch method modified to make more sence

This commit is contained in:
iLLiCiTiT 2020-04-20 18:49:10 +02:00
parent 2fc6aafecf
commit 28c737f375

View file

@ -58,28 +58,24 @@ class BaseAction(BaseHandler):
) )
def _launch(self, event): def _launch(self, event):
args = self._translate_event( entities = self._translate_event(event)
self.session, event
)
preactions_launched = self._handle_preactions(self.session, event) preactions_launched = self._handle_preactions(self.session, event)
if preactions_launched is False: if preactions_launched is False:
return return
interface = self._interface( interface = self._interface(
self.session, *args self.session, entities, event
) )
if interface: if interface:
return interface return interface
response = self.launch( response = self.launch(
self.session, *args self.session, entities, event
) )
return self._handle_result( return self._handle_result(response)
self.session, response, *args
)
def _handle_result(self, session, result, entities, event): def _handle_result(self, session, result, entities, event):
'''Validate the returned result from the action callback''' '''Validate the returned result from the action callback'''