Kaydet (Commit) 9ef9c07e authored tarafından Guido van Rossum's avatar Guido van Rossum

Changed to use make_call

üst b637221d
...@@ -134,40 +134,28 @@ class NFSClient(UDPClient): ...@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment