Skip to content

Commit 7d01387

Browse files
authored
Merge pull request #3708 from ktbyers/false_pword_match
Fixes 'enable' call issue when device prompt is a substring of literal 'password' string
2 parents 66b916f + ea4ce3e commit 7d01387

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

netmiko/adtran/adtran.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def enable(
4646

4747
# Search for trailing prompt or password pattern
4848
output += self.read_until_prompt_or_pattern(
49-
pattern=pattern, re_flags=re_flags
49+
pattern=pattern, re_flags=re_flags, read_entire_line=True
5050
)
5151

5252
# Send the "secret" in response to password pattern

netmiko/base_connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2051,7 +2051,7 @@ def enable(
20512051

20522052
# Search for trailing prompt or password pattern
20532053
output += self.read_until_prompt_or_pattern(
2054-
pattern=pattern, re_flags=re_flags
2054+
pattern=pattern, re_flags=re_flags, read_entire_line=True
20552055
)
20562056

20572057
# Send the "secret" in response to password pattern

0 commit comments

Comments
 (0)