From: Kefu Chai Date: Wed, 17 Jun 2020 04:34:17 +0000 (+0800) Subject: mgr/volumes/nfs: use f-string for creating Exception X-Git-Tag: v16.1.0~2049^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F35609%2Fhead;p=ceph.git mgr/volumes/nfs: use f-string for creating Exception for better understanding the reason of the failure Signed-off-by: Kefu Chai --- diff --git a/src/pybind/mgr/volumes/fs/nfs.py b/src/pybind/mgr/volumes/fs/nfs.py index 5bdabcf8976d..1492a6df7696 100644 --- a/src/pybind/mgr/volumes/fs/nfs.py +++ b/src/pybind/mgr/volumes/fs/nfs.py @@ -359,7 +359,7 @@ class FSExport(object): for export in export_list: ret, out, err = self.delete_export(cluster_id, None, export) if ret != 0: - raise Exception("Failed to delete exports: {err} and {ret}") + raise Exception(f"Failed to delete exports: {err} and {ret}") log.info(f"All exports successfully deleted for cluster id: {cluster_id}") except KeyError: log.info("No exports to delete")