From 9ed559619160c95848300d2b231b57fa056eb9a4 Mon Sep 17 00:00:00 2001 From: yucai100 Date: Thu, 21 Sep 2023 15:41:02 +0800 Subject: [PATCH 1/2] Update hp_comware.py fix the bug when the prompt with leading RBM_. characters for firewall HA raise netmiko.exceptions.ReadTimeout --- netmiko/hp/hp_comware.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/netmiko/hp/hp_comware.py b/netmiko/hp/hp_comware.py index b7c4b13b8..b769440e2 100644 --- a/netmiko/hp/hp_comware.py +++ b/netmiko/hp/hp_comware.py @@ -98,6 +98,9 @@ def set_base_prompt( pattern=pattern, ) + # Strip off any leading RBM_. characters for firewall HA + prompt = re.sub(r"^RBM_.", "", prompt, flags=re.M) + # Strip off leading character prompt = prompt[1:] prompt = prompt.strip() From 4f79678ba0d7270cce34e0e6457ef1497a07152f Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Tue, 17 Oct 2023 12:13:31 -0700 Subject: [PATCH 2/2] Fix linting failure (whitespace) --- netmiko/hp/hp_comware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netmiko/hp/hp_comware.py b/netmiko/hp/hp_comware.py index b769440e2..d9f6c6549 100644 --- a/netmiko/hp/hp_comware.py +++ b/netmiko/hp/hp_comware.py @@ -100,7 +100,7 @@ def set_base_prompt( # Strip off any leading RBM_. characters for firewall HA prompt = re.sub(r"^RBM_.", "", prompt, flags=re.M) - + # Strip off leading character prompt = prompt[1:] prompt = prompt.strip()