]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/rgwfile: raise Exception when failing to umount
authorHaomai Wang <haomai@xsky.com>
Mon, 7 Nov 2016 15:58:59 +0000 (23:58 +0800)
committerHaomai Wang <haomai@xsky.com>
Mon, 7 Nov 2016 15:58:59 +0000 (23:58 +0800)
Signed-off-by: Haomai Wang <haomai@xsky.com>
src/pybind/rgw/rgw_file.pyx

index a87d77379f1a055d89275288da4f7bd4729b575f..2a247d12aa5fe33b74da7af585a10c08d4b7dc7c 100644 (file)
@@ -334,7 +334,9 @@ cdef class LibRGWFS(object):
         """
         if self.state in ["mounted"]:
             with nogil:
-                rgw_umount(self.fs, 0);
+                ret = rgw_umount(self.fs, 0);
+            if ret != 0:
+                raise make_ex(ret, "error calling rgw_unmount")
             self.state = "shutdown"
 
     def __enter__(self):