]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/volumes/nfs: use f-string for creating Exception
authorKefu Chai <kchai@redhat.com>
Wed, 17 Jun 2020 04:34:17 +0000 (12:34 +0800)
committerVarsha Rao <varao@redhat.com>
Wed, 8 Jul 2020 05:36:35 +0000 (07:36 +0200)
for better understanding the reason of the failure

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 5b8ba6648d6e43d34c3f15b228a17843c5c9b1de)

src/pybind/mgr/volumes/fs/nfs.py

index 5bdabcf8976dbf58a2783174f56b0ae083b4a6b2..1492a6df7696d0a3932ef4d14361a7b98503ada9 100644 (file)
@@ -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")