]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/volumes/nfs: use f-string for creating Exception 35609/head
authorKefu Chai <kchai@redhat.com>
Wed, 17 Jun 2020 04:34:17 +0000 (12:34 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 17 Jun 2020 04:34:18 +0000 (12:34 +0800)
for better understanding the reason of the failure

Signed-off-by: Kefu Chai <kchai@redhat.com>
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")