diff options
author | Joel Edwards <joeledwards@gmail.com> | 2013-12-10 13:38:11 -0700 |
---|---|---|
committer | Joel Edwards <joeledwards@gmail.com> | 2013-12-11 07:37:56 -0700 |
commit | eb7099c5c23f9acabb6265d1fb39e0c0d9b6ba66 (patch) | |
tree | 6797817cc1293209cc01c25051945717e5170544 | |
parent | b6f8d73985be36b5f2f5a02e64d4586c1aab0cdf (diff) | |
download | pexpect-eb7099c5c23f9acabb6265d1fb39e0c0d9b6ba66.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: |