summaryrefslogtreecommitdiff
path: root/pexpect/replwrap.py
diff options
context:
space:
mode:
Diffstat (limited to 'pexpect/replwrap.py')
-rw-r--r--pexpect/replwrap.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pexpect/replwrap.py b/pexpect/replwrap.py
index 7b0e823..83a09c2 100644
--- a/pexpect/replwrap.py
+++ b/pexpect/replwrap.py
@@ -11,6 +11,7 @@ PY3 = (sys.version_info[0] >= 3)
if PY3:
def u(s): return s
+ basestring = str
else:
def u(s): return s.decode('utf-8')
@@ -37,7 +38,7 @@ class REPLWrapper(object):
new_prompt=PEXPECT_PROMPT,
continuation_prompt=PEXPECT_CONTINUATION_PROMPT,
extra_init_cmd=None):
- if isinstance(cmd_or_spawn, str):
+ if isinstance(cmd_or_spawn, basestring):
self.child = pexpect.spawnu(cmd_or_spawn, echo=False)
else:
self.child = cmd_or_spawn