Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NFS object does not have attribute isdir, isfile ect. #42

Open
cnc0090306 opened this issue Apr 20, 2021 · 1 comment
Open

NFS object does not have attribute isdir, isfile ect. #42

cnc0090306 opened this issue Apr 20, 2021 · 1 comment

Comments

@cnc0090306
Copy link

cnc0090306 commented Apr 20, 2021

nfs = libnfs.NFS('nfs://{SERVER}/{RESOURCE}/')
nfs.isdir("/{DIR}/)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NFS' object has no attribute 'isdir'
dir(nfs)
['__class__', '__del__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_nfs', '_url', 'listdir', 'lstat', 'mkdir', 'open', 'rmdir', 'stat', 'unlink']
@sahlberg
Copy link
Owner

isdir() should be there. Maybe you are using an old version of the wrapper?

Try installing libnfs from current master
and try installing libnfs-python from current master.

I just pushed a small change to libnfs-python to switch it to python3
and using current master of both libnfs and libnfs-python the nfs.isdir() method works for me in testing.

I verified that these instructions worked:
This module depends on and provides bindings for libnfs, a userspace NFS
library hosted at https://github.com/sahlberg/libnfs

Before you can build this module you must first install the latest version
of libnfs.

Building and installing

cd libnfs
make
cd ..
sudo python3 setup.py install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants