fixed case in which prompt was None

This commit is contained in:
Brian Coca 2015-06-18 10:05:23 -04:00
parent 7c65f3ddd7
commit aede9f08db

View file

@ -130,7 +130,9 @@ class ConnectionBase(with_metaclass(ABCMeta, object)):
return self.success_key in output
def check_password_prompt(self, output):
if isinstance(self.prompt, basestring):
if self.prompt in None:
return True
elif isinstance(self.prompt, basestring):
return output.endswith(self.prompt)
else:
return self.prompt(output)