diff options
author | jquast <contact@jeffquast.com> | 2013-10-09 10:49:49 -0700 |
---|---|---|
committer | jquast <contact@jeffquast.com> | 2013-10-09 10:49:49 -0700 |
commit | 27e769a682b8cfc7d0325136036ffd5e01533cc6 (patch) | |
tree | d8df938485ee9aa107555ecbb2f36e84dd6bcd83 | |
parent | fcf1202a46dcc5d68e9ef42c6d0705b5be8d1b6b (diff) | |
download | pexpect-incremental-decoder.tar.gz |
`is ucs is None` is not necessaryincremental-decoder
Don't know why I had this in one of my own implementations.
An incrementaldecoder never returns None, only u'', which is
what we'd want in this context, anywaay.
-rw-r--r-- | pexpect/__init__.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pexpect/__init__.py b/pexpect/__init__.py index 28291e1..753ec60 100644 --- a/pexpect/__init__.py +++ b/pexpect/__init__.py @@ -1765,8 +1765,7 @@ class spawnu(spawn): return s def _coerce_read_string(self, s): - ucs = self._decoder.decode(s, final=False) - return ucs if ucs is not None else self.string_type() + return self._decoder.decode(s, final=False) def _send(self, s): return os.write(self.child_fd, s.encode(self.encoding, self.errors)) |