From 4362934a94c5a6f7521f06aa1255e111094e1d88 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 27 Mar 2013 12:45:29 -0700 Subject: [PATCH] ceph-disk: conditionally remove mount path umount removes it on success; only remove it here if it is still there. Signed-off-by: Sage Weil --- src/ceph-disk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ceph-disk b/src/ceph-disk index 771a4dfd9aa84..1b3b75259837d 100755 --- a/src/ceph-disk +++ b/src/ceph-disk @@ -1380,8 +1380,9 @@ def mount_activate( unmount(path) raise finally: - # remove out temp dir - os.rmdir(path) + # remove our temp dir + if os.path.exists(path): + os.rmdir(path) def activate_dir( -- 2.39.5