]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cephfs-shell: Fix 'lls' command errors 28475/head
authorVarsha Rao <varao@redhat.com>
Mon, 10 Jun 2019 13:33:53 +0000 (19:03 +0530)
committerVarsha Rao <varao@redhat.com>
Mon, 10 Jun 2019 14:58:48 +0000 (20:28 +0530)
commitd1ddd4c50f56331c7036964f78d4e399e10431b8
tree660b58479ae364c536957a043bfd798104dbb5f6
parente2a343ab02063bbcf8bee97afe981344ce0f0a44
cephfs-shell: Fix 'lls' command errors

This patch fixes following:
* Not printing complete path when '..' is passed as argument.
* Printing of path for current working directory.
* No need to set default value for add_argument. As it returns empty list with
  nargs='*'.
* No need to check for absolute path. os.listdir takes both relative and
  absolute path.
* Use try-catch instead of if-else statement to catch exceptions.

Fixes: http://tracker.ceph.com/issues/40244
Signed-off-by: Varsha Rao <varao@redhat.com>
src/tools/cephfs/cephfs-shell