]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cephfs-shell: Fix 'lls' command errors
authorVarsha Rao <varao@redhat.com>
Mon, 10 Jun 2019 13:33:53 +0000 (19:03 +0530)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 20 Jun 2019 22:30:14 +0000 (15:30 -0700)
commit44e3e86e096f402d00c8f4d821356cd3fd5cc30a
tree3ed2c535a8200258add05642ee66e3c6c06abd9a
parenta8e8b009801e779b826f8e70e1195f9a0d45dd86
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>
(cherry picked from commit d1ddd4c50f56331c7036964f78d4e399e10431b8)
src/tools/cephfs/cephfs-shell