From: Martin v. Löwis Date: Wed, 11 Jul 2012 07:19:16 +0000 (+0200) Subject: Use _RPCFile.write properly. X-Git-Tag: v2.7.4rc1~704 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e0cc0f12c30692774aa0355e06f85d672610419;p=python Use _RPCFile.write properly. --- diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py index 831235de85..e1e6380c8f 100644 --- a/Lib/idlelib/run.py +++ b/Lib/idlelib/run.py @@ -259,8 +259,8 @@ class _RPCFile(io.TextIOBase): super.__setattr__(self, 'rpc', rpc) def __getattribute__(self, name): - # When accessing the 'rpc' attribute, use ours - if name == 'rpc': + # When accessing the 'rpc' attribute, or 'write', use ours + if name in ('rpc', 'write'): return io.TextIOBase.__getattribute__(self, name) # Else only look into the remote object only return getattr(self.rpc, name)