summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Quast <contact@jeffquast.com>2015-10-12 21:01:09 -0700
committerJeff Quast <contact@jeffquast.com>2015-10-12 21:01:09 -0700
commit6dbafe17834450d14e4141694e53a61af4fdfc96 (patch)
tree779055f6d8f8fede48c06011a035b2377e5cc4d5
parent64f598334d464016b097cec19861fe924526998e (diff)
downloadpexpect-asyncio_utf8_issue.tar.gz
use 'ucs' (uni-code-string) instead of 'data'asyncio_utf8_issue
-rw-r--r--pexpect/async.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pexpect/async.py b/pexpect/async.py
index ad75994..f7ad32b 100644
--- a/pexpect/async.py
+++ b/pexpect/async.py
@@ -37,15 +37,15 @@ class PatternWaiter(asyncio.Protocol):
def data_received(self, data):
spawn = self.expecter.spawn
- s = spawn._decoder.decode(data)
- spawn._log(s, 'read')
+ ucs = spawn._decoder.decode(data)
+ spawn._log(ucs, 'read')
if self.fut.done():
- spawn.buffer += data
+ spawn.buffer += ucs
return
try:
- index = self.expecter.new_data(data)
+ index = self.expecter.new_data(ucs)
if index is not None:
# Found a match
self.found(index)