More debug for connection errors
Change-Id: I8d5ffe956789560c5bca85ffe45bea26318b3c86
diff --git a/drivers/CiscoSX300.py b/drivers/CiscoSX300.py
index b68adf3..66212b5 100644
--- a/drivers/CiscoSX300.py
+++ b/drivers/CiscoSX300.py
@@ -349,6 +349,7 @@
elif index == 2:
self._prompt_name = self.connection.match.group(1).strip()
logging.debug("Got prompt name %s" % self._prompt_name)
+ print "Got prompt name %s" % self._prompt_name
return 0
elif index == 3 or index == 4:
self._cli("", False)
@@ -365,7 +366,11 @@
def _read_long_output(self):
prompt = self._prompt_name + '#'
- self.connection.expect(prompt)
+ try:
+ self.connection.expect(prompt)
+ except:
+ print "prompt is \"%s\"" % prompt
+ raise
buf = []
for line in self.connection.before.split('\r\n'):
buf.append(line.strip())