summaryrefslogtreecommitdiff
path: root/pexpect/utils.py
diff options
context:
space:
mode:
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.