Skip to content
Snippets Groups Projects
Commit 3c30be62 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(spawn.__init__): Use basestring instead of types.StringTypes.

(impl.re): Ditto.
parent 0e3d5aeb
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,6 @@ import select ...@@ -7,7 +7,6 @@ import select
import sets import sets
import sys import sys
import telnetlib import telnetlib
import types
# #
# Global variables. The user are supposed to change these. # Global variables. The user are supposed to change these.
...@@ -115,7 +114,7 @@ class spawn(expectable): ...@@ -115,7 +114,7 @@ class spawn(expectable):
settings = f.read() settings = f.read()
f.close() f.close()
if isinstance(cmd, types.StringTypes): if isinstance(cmd, basestring):
cmd = cmd.split(" ") cmd = cmd.split(" ")
(r, w) = os.pipe() (r, w) = os.pipe()
set_cloexec_flag(w) set_cloexec_flag(w)
...@@ -268,7 +267,7 @@ class impl: ...@@ -268,7 +267,7 @@ class impl:
# Doing this compilation again and again could be a problem. # Doing this compilation again and again could be a problem.
# I rely on the cache in module re. I hope it exists... # 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) regexp = re.compile(regexp)
match = regexp.search(exp.buffer()) match = regexp.search(exp.buffer())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment