mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
Changed to use make_call
This commit is contained in:
parent
b637221d93
commit
9ef9c07ed9
1 changed files with 12 additions and 24 deletions
|
@ -134,40 +134,28 @@ class NFSClient(UDPClient):
|
||||||
return self.cred
|
return self.cred
|
||||||
|
|
||||||
def Getattr(self, fh):
|
def Getattr(self, fh):
|
||||||
self.start_call(1)
|
return self.make_call(1, fh, \
|
||||||
self.packer.pack_fhandle(fh)
|
self.packer.pack_fhandle, \
|
||||||
self.do_call()
|
self.unpacker.unpack_attrstat)
|
||||||
as = self.unpacker.unpack_attrstat()
|
|
||||||
self.end_call()
|
|
||||||
return as
|
|
||||||
|
|
||||||
def Setattr(self, sa):
|
def Setattr(self, sa):
|
||||||
self.start_call(2)
|
return self.make_call(2, sa, \
|
||||||
self.packer.pack_sattrargs(sa)
|
self.packer.pack_sattrargs, \
|
||||||
self.do_call()
|
self.unpacker.unpack_attrstat)
|
||||||
as = self.unpacker.unpack_attrstat()
|
|
||||||
self.end_call()
|
|
||||||
return as
|
|
||||||
|
|
||||||
# Root() is obsolete
|
# Root() is obsolete
|
||||||
|
|
||||||
def Lookup(self, da):
|
def Lookup(self, da):
|
||||||
self.start_call(4)
|
return self.make_call(4, da, \
|
||||||
self.packer.pack_diropargs(da)
|
self.packer.pack_diropargs, \
|
||||||
self.do_call()
|
self.unpacker.unpack_diropres)
|
||||||
dr = self.unpacker.unpack_diropres()
|
|
||||||
self.end_call()
|
|
||||||
return dr
|
|
||||||
|
|
||||||
# ...
|
# ...
|
||||||
|
|
||||||
def Readdir(self, ra):
|
def Readdir(self, ra):
|
||||||
self.start_call(16)
|
return self.make_call(16, ra, \
|
||||||
self.packer.pack_readdirargs(ra)
|
self.packer.pack_readdirargs, \
|
||||||
self.do_call()
|
self.unpacker.unpack_readdirres)
|
||||||
rr = self.unpacker.unpack_readdirres()
|
|
||||||
self.end_call()
|
|
||||||
return rr
|
|
||||||
|
|
||||||
# Shorthand to get the entire contents of a directory
|
# Shorthand to get the entire contents of a directory
|
||||||
def Listdir(self, dir):
|
def Listdir(self, dir):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue