mirror of
https://github.com/ceph/ceph
synced 2026-08-02 07:03:18 +00:00
Merge PR #28473 into master
* refs/pull/28473/head: cephfs-shell: Catch OSError exceptions in lcd Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
This commit is contained in:
commit
2be64ebdee
@ -1007,13 +1007,11 @@ sub-directories, files')
|
||||
"""
|
||||
Moves into the given local directory
|
||||
"""
|
||||
|
||||
path = os.path.expanduser(args.path)
|
||||
if os.path.isdir(path):
|
||||
os.chdir(path)
|
||||
# self.poutput(get_all_possible_paths(args.path))
|
||||
else:
|
||||
self.poutput("%s: no such directory" % path)
|
||||
try:
|
||||
os.chdir(os.path.expanduser(args.path))
|
||||
except OSError as e:
|
||||
self.perror("Cannot change to {}: {}".format(e.filename,
|
||||
e.strerror), False)
|
||||
|
||||
def complete_lls(self, text, line, begidx, endidx):
|
||||
"""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user