Esempio n. 1
0
 def insert_arrived_action(cmdline, action, devices, actionexec, pos=-1, **kwargs):
     if action is None:
         spl = shlex.split(cmdline)
         if len(spl) > 1:
             action = ActionAction.create_action(spl[1:], devices)
             randid = -1
             if action is not None:
                 randid = int(spl[0])
                 action.set_randomid(randid)
                 EventManager.fire(
                     eventname='ActionParsed', randid=randid, action=action)
                 actionexec.insert_action(action, pos)
     else:
         actionexec.insert_action(action, pos)