]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix misunderstood readdir count (bytes, not dir entries)
authorGuido van Rossum <guido@python.org>
Tue, 15 Dec 1992 21:43:04 +0000 (21:43 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 15 Dec 1992 21:43:04 +0000 (21:43 +0000)
and minor other changes.

Demo/rpc/nfsclient.py

index 645a2a70dc8d1e0653858a3bd4b263979d9240da..7a3a87d90e313fe4cf2df5ff0f54e0ca0b263163 100644 (file)
@@ -169,7 +169,7 @@ class NFSClient(UDPClient):
        # Shorthand to get the entire contents of a directory
        def Listdir(self, dir):
                list = []
-               ra = (dir, 0, 16)
+               ra = (dir, 0, 2000)
                while 1:
                        (status, rest) = self.Readdir(ra)
                        if status <> NFS_OK:
@@ -177,10 +177,9 @@ class NFSClient(UDPClient):
                        entries, eof = rest
                        last_cookie = None
                        for fileid, name, cookie in entries:
-                               print (fileid, name, cookie) # XXX
                                list.append(fileid, name)
                                last_cookie = cookie
-                       if eof or not last_cookie:
+                       if eof or last_cookie == None:
                                break
                        ra = (ra[0], last_cookie, ra[2])
                return list
@@ -208,6 +207,6 @@ def test():
                print as
                list = ncl.Listdir(fh)
                for item in list: print item
-               mcl.Unmnt(filesys)
+               mcl.Umnt(filesys)
        
 test()