comparison frontends/src/jp/base.py @ 2486:031aa3cc67ac

jp (base): fixed assertion error when using CommandAnswering
author Goffi <goffi@goffi.org>
date Tue, 30 Jan 2018 08:43:52 +0100
parents 0046283a285d
children b4bf282d6354
comparison
equal deleted inserted replaced
2485:512c443a58ba 2486:031aa3cc67ac
872 action_callbacks = {} # XXX: set managed action types in a dict here: 872 action_callbacks = {} # XXX: set managed action types in a dict here:
873 # key is the action_type, value is the callable 873 # key is the action_type, value is the callable
874 # which will manage the answer. profile filtering is 874 # which will manage the answer. profile filtering is
875 # already managed when callback is called 875 # already managed when callback is called
876 876
877 def __init__(self, *args, **kwargs):
878 super(CommandAnswering, self).__init__(*args, **kwargs)
879 self.need_loop = True
880
877 def onActionNew(self, action_data, action_id, security_limit, profile): 881 def onActionNew(self, action_data, action_id, security_limit, profile):
878 if profile != self.profile: 882 if profile != self.profile:
879 return 883 return
880 try: 884 try:
881 action_type = action_data['meta_type'] 885 action_type = action_data['meta_type']