Skip to content

Commit 57bea0c

Browse files
ktbyersk-ribot
andauthored
Add buffer clean in Huawei session preparation (#3578)
Co-authored-by: Kévin RIBOT <[email protected]> Co-authored-by: Kévin Ribot <[email protected]>
1 parent 6d28b41 commit 57bea0c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

netmiko/huawei/huawei.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from typing import Optional, Any, Union, Sequence, Iterator, TextIO
22
import re
33
import warnings
4+
import time
45

56
from netmiko.no_enable import NoEnable
67
from netmiko.base_connection import DELAY_FACTOR_DEPR_SIMPLE_MSG
@@ -20,6 +21,9 @@ def session_preparation(self) -> None:
2021
# The _test_channel_read happens in special_login_handler()
2122
self.set_base_prompt()
2223
self.disable_paging(command="screen-length 0 temporary")
24+
# Clear the read buffer
25+
time.sleep(0.3 * self.global_delay_factor)
26+
self.clear_buffer()
2327

2428
def strip_ansi_escape_codes(self, string_buffer: str) -> str:
2529
"""

0 commit comments

Comments
 (0)