summaryrefslogtreecommitdiff
path: root/pexpect/utils.py
diff options
context:
space:
mode:
authorThomas Kluyver <thomas@kluyver.me.uk>2017-08-22 14:56:46 +0100
committerThomas Kluyver <thomas@kluyver.me.uk>2017-08-22 14:56:46 +0100
commite276c17250516ff5a3deca924e35fd3fa68957d9 (patch)
treed98167086ddc11b8e4d67aaae50cce143eaeba64 /pexpect/utils.py
parent8b4974f333f2d41b47a67c94c4c445a274d8ddd4 (diff)
parent964e03d4f63ecb045832cac9938be56feaeba46c (diff)
downloadpexpect-git-e276c17250516ff5a3deca924e35fd3fa68957d9.tar.gz
Merge branch 'master' of github.com:pexpect/pexpect
Diffstat (limited to 'pexpect/utils.py')
-rw-r--r--pexpect/utils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pexpect/utils.py b/pexpect/utils.py
index ae0fe9d..bafc280 100644
--- a/pexpect/utils.py
+++ b/pexpect/utils.py
@@ -11,6 +11,11 @@ except NameError:
# Alias Python2 exception to Python3
InterruptedError = select.error
+if sys.version_info[0] >= 3:
+ string_types = (str,)
+else:
+ string_types = (unicode, str)
+
def is_executable_file(path):
"""Checks that path is an executable regular file, or a symlink towards one.