From 17aebee1ca64b544ce923093ce7aabed9ce6772f Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Thu, 5 Apr 2018 00:29:16 +0000 Subject: [PATCH] [bcmshell.py] Match extra whitespace before prompt in regex --- sonic_sfp/bcmshell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonic_sfp/bcmshell.py b/sonic_sfp/bcmshell.py index 63156c753..6b2865948 100644 --- a/sonic_sfp/bcmshell.py +++ b/sonic_sfp/bcmshell.py @@ -54,7 +54,7 @@ def __init__(self, keepopen=False, timeout=10, opennow=False, logfileobj=None, raise SyntaxError("bcmshell constructor prompt expects an re string") else: self.re_prompt = re.compile(prompt, re.MULTILINE) - self.re_connectprompt = re.compile("bcmshell\r\n" + prompt, re.MULTILINE) + self.re_connectprompt = re.compile("bcmshell\r\n\s*" + prompt, re.MULTILINE) if timeout <= 0: raise ValueError("bcmshell.timeout must be > 0")