summaryrefslogtreecommitdiffstats
path: root/Demo/rpc/nfsclient.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-12-21 14:33:05 (GMT)
committerGuido van Rossum <guido@python.org>1992-12-21 14:33:05 (GMT)
commit9ef9c07ed972804dbfef4fec4d739805b64cae95 (patch)
tree6553989f7f122f7a2d488f840bb60e095c32de97 /Demo/rpc/nfsclient.py
parentb637221d93927b6e1cdcee51d67229b6f6b5bc06 (diff)
downloadcpython-9ef9c07ed972804dbfef4fec4d739805b64cae95.zip
cpython-9ef9c07ed972804dbfef4fec4d739805b64cae95.tar.gz
cpython-9ef9c07ed972804dbfef4fec4d739805b64cae95.tar.bz2
Changed to use make_call
Diffstat (limited to 'Demo/rpc/nfsclient.py')
-rw-r--r--Demo/rpc/nfsclient.py36
1 files changed, 12 insertions, 24 deletions
diff --git a/Demo/rpc/nfsclient.py b/Demo/rpc/nfsclient.py
index 4b6bc53..467e495 100644
--- a/Demo/rpc/nfsclient.py
+++ b/Demo/rpc/nfsclient.py
@@ -134,40 +134,28 @@ class NFSClient(UDPClient):
return self.cred
def Getattr(self, fh):
- self.start_call(1)
- self.packer.pack_fhandle(fh)
- self.do_call()
- as = self.unpacker.unpack_attrstat()
- self.end_call()
- return as
+ return self.make_call(1, fh, \
+ self.packer.pack_fhandle, \
+ self.unpacker.unpack_attrstat)
def Setattr(self, sa):
- self.start_call(2)
- self.packer.pack_sattrargs(sa)
- self.do_call()
- as = self.unpacker.unpack_attrstat()
- self.end_call()
- return as
+ return self.make_call(2, sa, \
+ self.packer.pack_sattrargs, \
+ self.unpacker.unpack_attrstat)
# Root() is obsolete
def Lookup(self, da):
- self.start_call(4)
- self.packer.pack_diropargs(da)
- self.do_call()
- dr = self.unpacker.unpack_diropres()
- self.end_call()
- return dr
+ return self.make_call(4, da, \
+ self.packer.pack_diropargs, \
+ self.unpacker.unpack_diropres)
# ...
def Readdir(self, ra):
- self.start_call(16)
- self.packer.pack_readdirargs(ra)
- self.do_call()
- rr = self.unpacker.unpack_readdirres()
- self.end_call()
- return rr
+ return self.make_call(16, ra, \
+ self.packer.pack_readdirargs, \
+ self.unpacker.unpack_readdirres)
# Shorthand to get the entire contents of a directory
def Listdir(self, dir):