summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2012-07-11 06:49:58 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2012-07-11 06:49:58 (GMT)
commit1ba32187c0737b3b8ae63b9ea215be7c2d423e6d (patch)
tree165528e4fe018a95ce7193a1679e90d298cc3530 /Lib/idlelib
parentdbde88696b5c36d5d62d6b8731688c10b26ce521 (diff)
downloadcpython-1ba32187c0737b3b8ae63b9ea215be7c2d423e6d.zip
cpython-1ba32187c0737b3b8ae63b9ea215be7c2d423e6d.tar.gz
cpython-1ba32187c0737b3b8ae63b9ea215be7c2d423e6d.tar.bz2
Don't use TextIOBase implementations in _RPCFile.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/run.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py
index c1b974a..831235d 100644
--- a/Lib/idlelib/run.py
+++ b/Lib/idlelib/run.py
@@ -251,12 +251,18 @@ class MyRPCServer(rpc.RPCServer):
class _RPCFile(io.TextIOBase):
"""Wrapper class for the RPC proxy to typecheck arguments
- that may not support pickling."""
+ that may not support pickling. The base class is there only
+ to support type tests; all implementations come from the remote
+ object."""
def __init__(self, rpc):
super.__setattr__(self, 'rpc', rpc)
- def __getattr__(self, name):
+ def __getattribute__(self, name):
+ # When accessing the 'rpc' attribute, use ours
+ if name == 'rpc':
+ return io.TextIOBase.__getattribute__(self, name)
+ # Else only look into the remote object only
return getattr(self.rpc, name)
def __setattr__(self, name, value):