From: Mykola Golub Date: Thu, 12 Mar 2020 09:42:05 +0000 (+0000) Subject: pybind/rados: don't try to close watch in dealoc if rados not connected X-Git-Tag: v15.2.10~36^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=78bfe2fc95610d699cbd358172ced4d7af5c3c9f;p=ceph.git pybind/rados: don't try to close watch in dealoc if rados not connected Signed-off-by: Mykola Golub (cherry picked from commit eeee5578877b2c96aa46d5ee427ea5c369a42501) --- diff --git a/src/pybind/rados/rados.pyx b/src/pybind/rados/rados.pyx index 0d0f6aba4df5..648603ae7954 100644 --- a/src/pybind/rados/rados.pyx +++ b/src/pybind/rados/rados.pyx @@ -2361,6 +2361,7 @@ cdef class Watch(object): return False def __dealloc__(self): + self.ioctx.rados.require_state("connected") self.close() def _callback(self, notify_id, notifier_id, watch_id, data):