@@ -35,15 +35,17 @@ def config_service_prompt_handler(spawn, config_pattern):
3535 """ Check if we need to send the sevice config prompt command.
3636 """
3737 if hasattr (spawn .settings , 'SERVICE_PROMPT_CONFIG_CMD' ) and spawn .settings .SERVICE_PROMPT_CONFIG_CMD :
38+ spawn .log .debug ('Waiting for config prompt' )
3839 # if the config prompt is seen, return
3940 if re .search (config_pattern , spawn .buffer ):
4041 return
4142 else :
42- # if no buffer changes for a few seconds, check again
43- if buffer_settled (spawn , spawn .settings .CONFIG_PROMPT_WAIT ):
43+ # if no buffer changes for (config timout) seconds, check again
44+ if buffer_settled (spawn , spawn .settings .CONFIG_TRANSITION_WAIT ):
4445 if re .search (config_pattern , spawn .buffer ):
4546 return
4647 else :
48+ spawn .log .debug ('Config prompt not seen, enabling service prompt config' )
4749 spawn .sendline (spawn .settings .SERVICE_PROMPT_CONFIG_CMD )
4850
4951
@@ -66,7 +68,6 @@ def config_transition(statemachine, spawn, context):
6668
6769 for attempt in range (max_attempts + 1 ):
6870 spawn .sendline (statemachine .config_command )
69- buffer_wait (spawn , spawn .settings .CONFIG_TRANSITION_WAIT )
7071 dialog .process (spawn , timeout = spawn .settings .CONFIG_TIMEOUT , context = context )
7172
7273 statemachine .detect_state (spawn )
0 commit comments