From 44b3dd4171e3da07ad261e3782a1eac1f3b7c98a Mon Sep 17 00:00:00 2001 From: Michael Fritch Date: Wed, 13 May 2020 17:14:35 -0600 Subject: [PATCH] pybind/ceph_volume_client: logger.warn() -> logger.warning() logger.warn() is the same as logger.warning(), but was removed in py3.3 Signed-off-by: Michael Fritch (cherry picked from commit fe4c7fd7471bf724c4a1f027580d9bae3ddc24eb) --- src/pybind/ceph_volume_client.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pybind/ceph_volume_client.py b/src/pybind/ceph_volume_client.py index 13f6fbf66359f..c9de9d1c737ad 100644 --- a/src/pybind/ceph_volume_client.py +++ b/src/pybind/ceph_volume_client.py @@ -1232,7 +1232,7 @@ class CephFSVolumeClient(object): volume_path_str = str(volume_path) if (auth_meta is None) or (not auth_meta['volumes']): - log.warn("deauthorized called for already-removed auth" + log.warning("deauthorized called for already-removed auth" "ID '{auth_id}' for volume ID '{volume}'".format( auth_id=auth_id, volume=volume_path.volume_id )) @@ -1241,7 +1241,7 @@ class CephFSVolumeClient(object): return if volume_path_str not in auth_meta['volumes']: - log.warn("deauthorized called for already-removed auth" + log.warning("deauthorized called for already-removed auth" "ID '{auth_id}' for volume ID '{volume}'".format( auth_id=auth_id, volume=volume_path.volume_id )) @@ -1272,7 +1272,7 @@ class CephFSVolumeClient(object): vol_meta = self._volume_metadata_get(volume_path) if (vol_meta is None) or (auth_id not in vol_meta['auths']): - log.warn("deauthorized called for already-removed auth" + log.warning("deauthorized called for already-removed auth" "ID '{auth_id}' for volume ID '{volume}'".format( auth_id=auth_id, volume=volume_path.volume_id )) @@ -1444,7 +1444,7 @@ class CephFSVolumeClient(object): try: self.fs.rmdir(self._snapshot_path(dir_path, snapshot_name)) except cephfs.ObjectNotFound: - log.warn("Snapshot was already gone: {0}".format(snapshot_name)) + log.warning("Snapshot was already gone: {0}".format(snapshot_name)) def create_snapshot_volume(self, volume_path, snapshot_name, mode=0o755): self._snapshot_create(self._get_path(volume_path), snapshot_name, mode) @@ -1567,6 +1567,6 @@ class CephFSVolumeClient(object): try: ioctx.remove_object(object_name) except rados.ObjectNotFound: - log.warn("Object '{0}' was already removed".format(object_name)) + log.warning("Object '{0}' was already removed".format(object_name)) finally: ioctx.close() -- 2.39.5