diff options
Diffstat (limited to 'Lib/idlelib/rpc.py')
-rw-r--r-- | Lib/idlelib/rpc.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Lib/idlelib/rpc.py b/Lib/idlelib/rpc.py index d097f9b..1620063 100644 --- a/Lib/idlelib/rpc.py +++ b/Lib/idlelib/rpc.py @@ -121,7 +121,7 @@ request_queue = Queue.Queue(0) response_queue = Queue.Queue(0) -class SocketIO: +class SocketIO(object): nextseq = 0 @@ -475,7 +475,7 @@ class SocketIO: #----------------- end class SocketIO -------------------- -class RemoteObject: +class RemoteObject(object): # Token mix-in class pass @@ -484,7 +484,7 @@ def remoteref(obj): objecttable[oid] = obj return RemoteProxy(oid) -class RemoteProxy: +class RemoteProxy(object): def __init__(self, oid): self.oid = oid @@ -533,7 +533,7 @@ class RPCClient(SocketIO): def get_remote_proxy(self, oid): return RPCProxy(self, oid) -class RPCProxy: +class RPCProxy(object): __methods = None __attributes = None @@ -549,7 +549,11 @@ class RPCProxy: return MethodProxy(self.sockio, self.oid, name) if self.__attributes is None: self.__getattributes() - if not self.__attributes.has_key(name): + if self.__attributes.has_key(name): + value = self.sockio.remotecall(self.oid, '__getattribute__', + (name,), {}) + return value + else: raise AttributeError, name def __getattributes(self): @@ -579,7 +583,7 @@ def _getattributes(obj, attributes): if not callable(attr): attributes[name] = 1 -class MethodProxy: +class MethodProxy(object): def __init__(self, sockio, oid, name): self.sockio = sockio |