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: wip-pdonnell-testing-20200918.022351~1556^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=eeee5578877b2c96aa46d5ee427ea5c369a42501;p=ceph-ci.git pybind/rados: don't try to close watch in dealoc if rados not connected Signed-off-by: Mykola Golub --- diff --git a/src/pybind/rados/rados.pyx b/src/pybind/rados/rados.pyx index 00591cda98e..3de6c5720a8 100644 --- a/src/pybind/rados/rados.pyx +++ b/src/pybind/rados/rados.pyx @@ -2355,6 +2355,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):