Use _RPCFile.write properly.
This commit is contained in:
parent
1ba32187c0
commit
3e0cc0f12c
|
@ -259,8 +259,8 @@ class _RPCFile(io.TextIOBase):
|
||||||
super.__setattr__(self, 'rpc', rpc)
|
super.__setattr__(self, 'rpc', rpc)
|
||||||
|
|
||||||
def __getattribute__(self, name):
|
def __getattribute__(self, name):
|
||||||
# When accessing the 'rpc' attribute, use ours
|
# When accessing the 'rpc' attribute, or 'write', use ours
|
||||||
if name == 'rpc':
|
if name in ('rpc', 'write'):
|
||||||
return io.TextIOBase.__getattribute__(self, name)
|
return io.TextIOBase.__getattribute__(self, name)
|
||||||
# Else only look into the remote object only
|
# Else only look into the remote object only
|
||||||
return getattr(self.rpc, name)
|
return getattr(self.rpc, name)
|
||||||
|
|
Loading…
Reference in New Issue