@@ -88,21 +88,26 @@ def disable_paging(
8888 )
8989
9090 def config_mode (
91- self , config_command : str = "config" , pattern : str = " " , re_flags : int = 0
91+ self , config_command : str = "config" , pattern : str = r"\)# " , re_flags : int = 0
9292 ) -> str :
9393 return super ().config_mode (
9494 config_command = config_command , pattern = pattern , re_flags = re_flags
9595 )
9696
9797 def check_config_mode (
98- self , check_string : str = ")#" , pattern : str = "" , force_regex : bool = False
98+ self ,
99+ check_string : str = "\\ )#" ,
100+ pattern : str = "[#>]" ,
101+ force_regex : bool = True ,
99102 ) -> bool :
100- return super ().check_config_mode (check_string = check_string )
103+ return super ().check_config_mode (
104+ check_string = check_string , pattern = pattern , force_regex = force_regex
105+ )
101106
102107 def exit_config_mode (
103108 self , exit_config : str = "return" , pattern : str = r"#.*"
104109 ) -> str :
105- return super ().exit_config_mode (exit_config = exit_config )
110+ return super ().exit_config_mode (exit_config = exit_config , pattern = pattern )
106111
107112 def check_enable_mode (self , check_string : str = "#" ) -> bool :
108113 return super ().check_enable_mode (check_string = check_string )
0 commit comments