def _gethandle(self, path):
        fh = None
        fattr = None
        try:
            if path == "" or path == "/" or path == "/.." or path == "/.":
                fh = self.rootdh
                fattr = self.rootattr
            else:
                fh, fattr, cachetime = self.handles[path]
            # check that it isn't stale
            self.ncl.fuid = fattr[3]
            self.ncl.fgid = fattr[4]
            #Commented to save a call. May cause problems?
            #fattr = self.ncl.Getattr(dh)
            #self.handles[path][1] = fattr
        except (__HOLE__,NFSError) as e:
            if isinstance(e, KeyError) or e.errno() == NFSError.NFS3ERR_STALE:
                if isinstance(e, NFSError):
                    del self.handles[path]
                tmppath, elem = path.rsplit("/",1)
                dh, fattr = self.gethandle(tmppath)
                self.ncl.fuid = fattr[3]
                self.ncl.fgid = fattr[4]
                fh, fattr, dattr = self.ncl.Lookup((dh, elem))
                self.ncl.fuid = fattr[3]
                self.ncl.fgid = fattr[4]
                self.handles[path] = (fh, fattr, time())
                self.handles[tmppath] = (dh, dattr, time())
            else:
                raise
        return (fh, fattr)
dataset/ETHPy150Open bonsaiviking/NfSpy/nfspy/nfspy.py/NfSpy._gethandle