summaryrefslogtreecommitdiff
path: root/Lib/idlelib/run.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2012-07-09 17:57:13 -0400
committerTerry Jan Reedy <tjreedy@udel.edu>2012-07-09 17:57:13 -0400
commitf8fc674f0bc1819a85e64e1f3174b682260adab6 (patch)
tree97e42dfa9963e0f46560d656ddd046bb4ed5a6e2 /Lib/idlelib/run.py
parent9e6bf1a8ee8ea9d7b187763c92cd500bc614fc64 (diff)
downloadcpython-git-f8fc674f0bc1819a85e64e1f3174b682260adab6.tar.gz
Issue 13532: Allow bytearrays to be written also.
Diffstat (limited to 'Lib/idlelib/run.py')
-rw-r--r--Lib/idlelib/run.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py
index 9389a2b0aa..67d1881060 100644
--- a/Lib/idlelib/run.py
+++ b/Lib/idlelib/run.py
@@ -263,8 +263,8 @@ class _RPCFile(io.TextIOBase):
return setattr(self.rpc, name, value)
def write(self, s):
- if not isinstance(s, basestring):
- raise TypeError('must be str, not ' + type(s).__name__)
+ if not isinstance(s, (basestring, bytearray)):
+ raise TypeError('must be string, not ' + type(s).__name__)
return self.rpc.write(s)
class MyHandler(rpc.RPCHandler):