]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-disk: conditionally remove mount path
authorSage Weil <sage@inktank.com>
Wed, 27 Mar 2013 19:45:29 +0000 (12:45 -0700)
committerSage Weil <sage@inktank.com>
Wed, 27 Mar 2013 23:30:48 +0000 (16:30 -0700)
umount removes it on success; only remove it here if it is still there.

Signed-off-by: Sage Weil <sage@inktank.com>
src/ceph-disk

index 771a4dfd9aa84215d32ee8bceef1cbcc54309cd1..1b3b75259837d5568289e5f38f6d7f9428d4a165 100755 (executable)
@@ -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(