Merge PR #28652 into master

* refs/pull/28652/head:
	cephfs-shell: Add error message for invalid ls commands

Reviewed-by: Rishabh Dave <ridave@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
This commit is contained in:
Patrick Donnelly 2019-08-14 15:05:29 -07:00
commit aed88d43a1
No known key found for this signature in database
GPG Key ID: 3A2A7E25BEA8AADB

View File

@ -117,8 +117,9 @@ def ls(path, opts=''):
elif almost_all and dent.d_name in (b'.', b'..'):
continue
yield dent
except cephfs.ObjectNotFound:
return []
except libcephfs.ObjectNotFound:
perror('{}: no such directory exists'.format(path), end='\n',
apply_style=True)
def glob(path, pattern):