summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-03-27 12:45:29 -0700
committerSage Weil <sage@inktank.com>2013-04-26 13:40:06 -0700
commit0c8efc0664f068a1952fe54b8034d005cf3f9ce8 (patch)
tree0b3611a8f84f52f60dc97139844883edaef125ba
parent153994cdcf9bc4a9719849d951bec5f4983340b5 (diff)
downloadceph-0c8efc0664f068a1952fe54b8034d005cf3f9ce8.tar.gz
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 <sage@inktank.com> (cherry picked from commit 4362934a94c5a6f7521f06aa1255e111094e1d88)
-rwxr-xr-xsrc/ceph-disk5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ceph-disk b/src/ceph-disk
index 3579765ac00..5c5f82ad007 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(