diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2012-07-11 06:48:34 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2012-07-11 06:48:34 (GMT) |
commit | c27616580dfd7a4693c28c44ecd03cf749ff45fc (patch) | |
tree | 711d9f5bb74c5b88b75fbd1a35fd2b611aa939aa /Lib/idlelib | |
parent | 8a75bed3177a68dbd49ef5e9559ed3bf6ea4438d (diff) | |
download | cpython-c27616580dfd7a4693c28c44ecd03cf749ff45fc.zip cpython-c27616580dfd7a4693c28c44ecd03cf749ff45fc.tar.gz cpython-c27616580dfd7a4693c28c44ecd03cf749ff45fc.tar.bz2 |
Don't use TextIOBase implementations in _RPCFile.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r-- | Lib/idlelib/run.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py index 4296aaf..43a7f65 100644 --- a/Lib/idlelib/run.py +++ b/Lib/idlelib/run.py @@ -247,12 +247,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): |