Skip to content

Commit

Permalink
Merge pull request #46 from nobletrout/master
Browse files Browse the repository at this point in the history
update for python3
  • Loading branch information
sahlberg authored Oct 14, 2021
2 parents fa501f9 + 57458c9 commit f245df1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions utils/nfs-ls.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,20 @@
import libnfs

def usage():
print 'Usage: nfs-ls.py <NFS-URL>'
print ''
print 'Example: nfs-ls.py nfs://127.0.0.1/data'
print('Usage: nfs-ls.py <NFS-URL>')
print('')
print('Example: nfs-ls.py nfs://127.0.0.1/data')
sys.exit()

def ls(dir):
import libnfs

nfs = libnfs.NFS(dir)
print 'nfs', nfs
print('nfs %', nfs)
for ent in nfs.listdir("."):
if ent in ['.', '..']:
continue
st = nfs.lstat(ent)
print ent, st
print(ent, st)


if __name__ == "__main__":
Expand Down

0 comments on commit f245df1

Please sign in to comment.