From: Haomai Wang Date: Mon, 7 Nov 2016 15:58:59 +0000 (+0800) Subject: pybind/rgwfile: raise Exception when failing to umount X-Git-Tag: v11.1.0~389^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=aef68c458e9269389a75e6ce6164c22b2699dd7c;p=ceph.git pybind/rgwfile: raise Exception when failing to umount Signed-off-by: Haomai Wang --- diff --git a/src/pybind/rgw/rgw_file.pyx b/src/pybind/rgw/rgw_file.pyx index a87d77379f1a0..2a247d12aa5fe 100644 --- a/src/pybind/rgw/rgw_file.pyx +++ b/src/pybind/rgw/rgw_file.pyx @@ -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):