Skip to content

Commit

Permalink
update for python3
Browse files Browse the repository at this point in the history
  • Loading branch information
captainupdates committed Oct 14, 2021
1 parent fa501f9 commit 57458c9
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 57458c9

Please sign in to comment.