From: Martin v. Löwis Date: Mon, 9 Jul 2012 19:07:41 +0000 (+0200) Subject: Widen test to support unicode. X-Git-Tag: v2.7.4rc1~708 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9e6bf1a8ee8ea9d7b187763c92cd500bc614fc64;p=thirdparty%2FPython%2Fcpython.git Widen test to support unicode. --- diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index 14f062e09de8..3e23e6c0ad24 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 82db38a781ca..9389a2b0aad1 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)