diff --git a/bilby/core/sampler/cpnest.py b/bilby/core/sampler/cpnest.py
index a2b665687cf9aceefd628ba5d4b0dd6bbdd768f3..611219e76708e7cae9f9bae073d7c44d95e5b480 100644
--- a/bilby/core/sampler/cpnest.py
+++ b/bilby/core/sampler/cpnest.py
@@ -114,7 +114,7 @@ class Cpnest(NestedSampler):
             out.run()
         except SystemExit as e:
             import sys
-            logger.info(f"Caught exit code {e.args[0]}, exiting with signal {self.exit_code}")
+            logger.info("Caught exit code {}, exiting with signal {}".format(e.args[0], self.exit_code))
             sys.exit(self.exit_code)
 
         if self.plot:
diff --git a/bilby/core/sampler/dynesty.py b/bilby/core/sampler/dynesty.py
index cdf5846409df229728c2f33161ff5823dd325af5..d008e45f93fbf9a5f70bcc0c79ab37e6e4aa4c9c 100644
--- a/bilby/core/sampler/dynesty.py
+++ b/bilby/core/sampler/dynesty.py
@@ -631,7 +631,7 @@ class Dynesty(NestedSampler):
                 filename = "{}/{}_checkpoint_stats.png".format(self.outdir, self.label)
                 fig, axs = plt.subplots(nrows=3, sharex=True)
                 for ax, name in zip(axs, ["boundidx", "nc", "scale"]):
-                    ax.plot(getattr(self.sampler, f"saved_{name}"), color="C0")
+                    ax.plot(getattr(self.sampler, "saved_{}".format(name)), color="C0")
                     ax.set_ylabel(name)
                 axs[-1].set_xlabel("iteration")
                 fig.tight_layout()