From 3c30be6274ccc24911060b08e69af854d03a7402 Mon Sep 17 00:00:00 2001
From: Per Cederqvist <ceder@lysator.liu.se>
Date: Sat, 11 Oct 2003 19:02:01 +0000
Subject: [PATCH] (spawn.__init__): Use basestring instead of
 types.StringTypes. (impl.re): Ditto.

---
 pcl_expect.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/pcl_expect.py b/pcl_expect.py
index 968992c..7641ae4 100644
--- a/pcl_expect.py
+++ b/pcl_expect.py
@@ -7,7 +7,6 @@ import select
 import sets
 import sys
 import telnetlib
-import types
 
 #
 # Global variables.  The user are supposed to change these.
@@ -115,7 +114,7 @@ class spawn(expectable):
             settings = f.read()
             f.close()
 
-        if isinstance(cmd, types.StringTypes):
+        if isinstance(cmd, basestring):
             cmd = cmd.split(" ")
         (r, w) = os.pipe()
         set_cloexec_flag(w)
@@ -268,7 +267,7 @@ class impl:
 
         # Doing this compilation again and again could be a problem.
         # I rely on the cache in module re.  I hope it exists...
-        if isinstance(regexp, types.StringTypes):
+        if isinstance(regexp, basestring):
             regexp = re.compile(regexp)
 
         match = regexp.search(exp.buffer())
-- 
GitLab