summaryrefslogtreecommitdiff
path: root/pexpect/pxssh.py
diff options
context:
space:
mode:
authorJeff Quast <contact@jeffquast.com>2015-09-20 19:43:31 -0700
committerJeff Quast <contact@jeffquast.com>2015-09-20 19:43:31 -0700
commitb6e25ba148a4ffdf5ba0e4ba61aa78f449773cca (patch)
treeba2eec8a8bd1df7f0b21115f8ae8896db9ad364c /pexpect/pxssh.py
parent7f046a6cf86d8f60a6cf23c40ef625e5acbc1a32 (diff)
parentf5993888e092bd8cecc98ac9558700d4fe8624cf (diff)
downloadpexpect-git-document-blocking-write.tar.gz
Merge remote-tracking branch 'origin/master' into document-blocking-writedocument-blocking-write
Diffstat (limited to 'pexpect/pxssh.py')
-rw-r--r--pexpect/pxssh.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/pexpect/pxssh.py b/pexpect/pxssh.py
index 71f56a0..4638164 100644
--- a/pexpect/pxssh.py
+++ b/pexpect/pxssh.py
@@ -95,9 +95,12 @@ class pxssh (spawn):
def __init__ (self, timeout=30, maxread=2000, searchwindowsize=None,
logfile=None, cwd=None, env=None, ignore_sighup=True, echo=True,
- options={}):
+ options={}, encoding=None, codec_errors='strict'):
- spawn.__init__(self, None, timeout=timeout, maxread=maxread, searchwindowsize=searchwindowsize, logfile=logfile, cwd=cwd, env=env, ignore_sighup=ignore_sighup, echo=echo)
+ spawn.__init__(self, None, timeout=timeout, maxread=maxread,
+ searchwindowsize=searchwindowsize, logfile=logfile,
+ cwd=cwd, env=env, ignore_sighup=ignore_sighup, echo=echo,
+ encoding=encoding, codec_errors=codec_errors)
self.name = '<pxssh>'
@@ -169,7 +172,7 @@ class pxssh (spawn):
# maximum time for reading the entire prompt
total_timeout = timeout_multiplier * 3.0
- prompt = b''
+ prompt = self.string_type()
begin = time.time()
expired = 0.0
timeout = first_char_timeout
@@ -334,7 +337,7 @@ class pxssh (spawn):
if not self.set_unique_prompt():
self.close()
raise ExceptionPxssh('could not set shell prompt '
- '(recieved: %r, expected: %r).' % (
+ '(received: %r, expected: %r).' % (
self.before, self.PROMPT,))
return True