]> granicus.if.org Git - python/commitdiff
Use _RPCFile.write properly.
authorMartin v. Löwis <martin@v.loewis.de>
Wed, 11 Jul 2012 07:19:16 +0000 (09:19 +0200)
committerMartin v. Löwis <martin@v.loewis.de>
Wed, 11 Jul 2012 07:19:16 +0000 (09:19 +0200)
Lib/idlelib/run.py

index 831235de8589a41f51f6e9ee721a46f17848220e..e1e6380c8f260c8abb6d0e8c8fb9551c75d8dcd0 100644 (file)
@@ -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)