From: Patrick Donnelly Date: Tue, 3 Dec 2019 22:33:07 +0000 (-0800) Subject: pybind/mgr/volumes: use py3 items iterator X-Git-Tag: v15.1.0~662^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=03f80804784052d7bf8a0802c319dccaa9b12389;p=ceph-ci.git pybind/mgr/volumes: use py3 items iterator Otherwise this raises an exception. Fixes: https://tracker.ceph.com/issues/43113 Signed-off-by: Patrick Donnelly --- diff --git a/src/pybind/mgr/volumes/fs/volume.py b/src/pybind/mgr/volumes/fs/volume.py index 0d5db843632..842d5ced3b0 100644 --- a/src/pybind/mgr/volumes/fs/volume.py +++ b/src/pybind/mgr/volumes/fs/volume.py @@ -128,7 +128,7 @@ class ConnectionPool(object): def cleanup_connections(self): with self.lock: log.info("scanning for idle connections..") - idle_fs = [fs_name for fs_name,conn in self.connections.iteritems() + idle_fs = [fs_name for fs_name,conn in self.connections.items() if conn.is_connection_idle(ConnectionPool.CONNECTION_IDLE_INTERVAL)] for fs_name in idle_fs: log.info("cleaning up connection for '{}'".format(fs_name))