summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/idlelib/PyShell.py2
-rw-r--r--Lib/idlelib/run.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index 14f062e..3e23e6c 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -1265,7 +1265,7 @@ class PseudoFile(object):
self.encoding = encoding
def write(self, s):
- if not isinstance(s, str):
+ if not isinstance(s, basestring):
raise TypeError('must be str, not ' + type(s).__name__)
self.shell.write(s, self.tags)
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py
index 82db38a..9389a2b 100644
--- a/Lib/idlelib/run.py
+++ b/Lib/idlelib/run.py
@@ -263,7 +263,7 @@ class _RPCFile(io.TextIOBase):
return setattr(self.rpc, name, value)
def write(self, s):
- if not isinstance(s, str):
+ if not isinstance(s, basestring):
raise TypeError('must be str, not ' + type(s).__name__)
return self.rpc.write(s)