RE-escape the prompt string returned from the switch
If we don't, unexpected RE metacharacters could cause all kinds of
trouble.
Change-Id: I34c8bdec99493cb018197f873397d370a831f09f
diff --git a/drivers/CiscoSX300.py b/drivers/CiscoSX300.py
index 2060c31..c00021c 100644
--- a/drivers/CiscoSX300.py
+++ b/drivers/CiscoSX300.py
@@ -443,7 +443,7 @@
logging.error("Login failure: %s\n", self.connection.match)
raise IOError
elif index == 2:
- self._prompt_name = self.connection.match.group(1).strip()
+ self._prompt_name = re.escape(self.connection.match.group(1).strip())
# Horrible output from the switch at login time may
# confuse our pexpect stuff here. If we've somehow got
# multiple lines of output, clean up and just take the