@@ -373,21 +373,23 @@ def debug_publish_current_action(self):
373
373
"""
374
374
Publishes the name of the currently active action
375
375
"""
376
- if self .debug_active :
377
- # Check if there is something on the stack
378
- if len (self .stack ) > 0 :
379
- # Get the top element
380
- stack_top = self .stack [- 1 ][1 ]
381
- # Check if it is an action or a sequence element and retrieve the current action
382
- if isinstance (stack_top , AbstractActionElement ):
383
- current_action = stack_top
384
- elif isinstance (stack_top , SequenceElement ):
385
- current_action = stack_top .current_action
386
- else :
387
- return
388
- # Only publish if the action changed
389
- if current_action .name != self .debug_active_action_cache :
390
- # Publish the name of the current action
391
- self .debug_current_action_publisher .publish (String (data = current_action .name ))
392
- # Cache the current action name
393
- self .debug_active_action_cache = current_action .name
376
+ # Check if debugging is active and if there is something on the stack
377
+ if not self .debug_active or len (self .stack ) == 0 :
378
+ return
379
+
380
+ # Get the top element
381
+ stack_top = self .stack [- 1 ][1 ]
382
+ # Check if it is an action or a sequence element and retrieve the current action
383
+ if isinstance (stack_top , AbstractActionElement ):
384
+ current_action = stack_top
385
+ elif isinstance (stack_top , SequenceElement ):
386
+ current_action = stack_top .current_action
387
+ else :
388
+ return
389
+
390
+ # Only publish if the action changed
391
+ if current_action .name != self .debug_active_action_cache :
392
+ # Publish the name of the current action
393
+ self .debug_current_action_publisher .publish (String (data = current_action .name ))
394
+ # Cache the current action name
395
+ self .debug_active_action_cache = current_action .name
0 commit comments