File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -377,13 +377,16 @@ class Worker(threading.Thread):
377
377
378
378
def enqueue (self ):
379
379
structure = self .gesture ["type" ];
380
- if (structure ):
381
- if structure .direction == 't' :
382
- self .gesture_queue .extend (map (lambda x : shlex .split (x ), self .gestures [structure .type ][structure .fingers ][structure .direction ]));
383
- elif structure .event == 'update' :
384
- self .gesture_queue .extend (map (lambda x : shlex .split (x ), self .gestures [structure .type ][structure .fingers ][structure .direction ][structure .event ][structure .update_direction ]));
385
- else :
386
- self .gesture_queue .extend (map (lambda x : shlex .split (x ), self .gestures [structure .type ][structure .fingers ][structure .direction ][structure .event ]));
380
+ try :
381
+ if (structure ):
382
+ if structure .direction == 't' :
383
+ self .gesture_queue .extend (map (lambda x : shlex .split (x ), self .gestures [structure .type ][structure .fingers ][structure .direction ]));
384
+ elif structure .event == 'update' :
385
+ self .gesture_queue .extend (map (lambda x : shlex .split (x ), self .gestures [structure .type ][structure .fingers ][structure .direction ][structure .event ][structure .update_direction ]));
386
+ else :
387
+ self .gesture_queue .extend (map (lambda x : shlex .split (x ), self .gestures [structure .type ][structure .fingers ][structure .direction ][structure .event ]));
388
+ except Exception :
389
+ print ("Gesture recognized but not configured." )
387
390
388
391
def update_status (self , slot , new_state , max_dis ):
389
392
self .status [slot ] = new_state ;
You can’t perform that action at this time.
0 commit comments