@@ -513,7 +513,8 @@ def call_service(self, target=None, command='', *args, **kwargs):
513513 sm .go_to (self .start_state ,
514514 spawn ,
515515 context = handle .context ,
516- timeout = timeout )
516+ timeout = timeout ,
517+ prompt_recovery = self .prompt_recovery )
517518 except (UniconAuthenticationError , CredentialsExhaustedError ):
518519 # Don't wrap auth errors - re-raise them directly
519520 raise
@@ -611,7 +612,6 @@ def __init__(self, connection, context, **kwargs):
611612 self .matched_retry_sleep = connection .settings .EXECUTE_MATCHED_RETRY_SLEEP
612613 self .state_change_matched_retries = connection .settings .EXECUTE_STATE_CHANGE_MATCH_RETRIES
613614 self .state_change_matched_retry_sleep = connection .settings .EXECUTE_STATE_CHANGE_MATCH_RETRY_SLEEP
614- self .detect_state = True
615615
616616 def log_service_call (self ):
617617 pass
@@ -635,7 +635,7 @@ def call_service(self, command=[], # noqa: C901
635635 if allow_state_change is None :
636636 allow_state_change = con .settings .EXEC_ALLOW_STATE_CHANGE
637637
638- self . detect_state = detect_state if detect_state is not None else self . detect_state
638+ detect_state = True if detect_state is None else detect_state
639639
640640 timeout = timeout or self .timeout
641641
@@ -693,7 +693,7 @@ def call_service(self, command=[], # noqa: C901
693693 if custom_auth_stmt :
694694 dialog += Dialog (custom_auth_stmt )
695695
696- if self . detect_state :
696+ if detect_state :
697697 # Add all known states to detect state changes.
698698 for state in sm .states :
699699 # The current state is already added by the service_dialog method
@@ -3130,4 +3130,3 @@ def __getattr__(self, attr):
31303130 else :
31313131 raise AttributeError ('Device %s and/or connection %s has no attribute %s'
31323132 % (self .conn .device , self .conn , attr ))
3133-
0 commit comments