diff options
author | Joel Edwards <joeledwards@gmail.com> | 2013-12-10 13:38:11 -0700 |
---|---|---|
committer | Joel Edwards <joeledwards@gmail.com> | 2013-12-10 13:38:11 -0700 |
commit | e7bb251686a8b92d89c6ce12bcb631b3189c8e40 (patch) | |
tree | 0e98a5829566783c540bb7083505b8025a9e65b0 | |
parent | 729733b5205479498a4992e056d9466a5aaa1835 (diff) | |
download | pexpect-e7bb251686a8b92d89c6ce12bcb631b3189c8e40.tar.gz |
Removed coerce_result argument from pexpect read_nonblocking method.
-rw-r--r-- | pexpect/__init__.py | 10 | ||||
-rw-r--r-- | pexpect/pxssh.py | 2 |
2 files changed, 4 insertions, 8 deletions
diff --git a/pexpect/__init__.py b/pexpect/__init__.py index e248ad3..ed5e1e4 100644 --- a/pexpect/__init__.py +++ b/pexpect/__init__.py @@ -843,7 +843,7 @@ class spawn(object): second_log.write(s) second_log.flush() - def read_nonblocking(self, size=1, timeout=-1, coerce_result=True): + def read_nonblocking(self, size=1, timeout=-1): '''This reads at most size characters from the child application. It includes a timeout. If the read does not complete within the timeout period then a TIMEOUT exception is raised. If the end of file is read @@ -914,12 +914,8 @@ class spawn(object): self.flag_eof = True raise EOF('End Of File (EOF). Empty string style platform.') - cs = self._coerce_read_string(s) - self._log(cs, 'read') - - if coerce_result: - s = cs - + s = self._coerce_read_string(s) + self._log(s, 'read') return s raise ExceptionPexpect('Reached an unexpected state.') diff --git a/pexpect/pxssh.py b/pexpect/pxssh.py index e644a74..58b51ce 100644 --- a/pexpect/pxssh.py +++ b/pexpect/pxssh.py @@ -166,7 +166,7 @@ class pxssh (spawn): while expired < total_timeout: try: - c = self.read_nonblocking(size=1, timeout=timeout, coerce_result=False) + c = self.read_nonblocking(size=1, timeout=timeout) if prompt is None: prompt = c else: |