From 4a7e8c95c86ec33c3dcd01f4ad00e4de9d5b99f8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 18:00:30 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/molecule_plugins/vagrant/modules/vagrant.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/molecule_plugins/vagrant/modules/vagrant.py b/src/molecule_plugins/vagrant/modules/vagrant.py index 0900b174..f085c8d5 100755 --- a/src/molecule_plugins/vagrant/modules/vagrant.py +++ b/src/molecule_plugins/vagrant/modules/vagrant.py @@ -498,10 +498,7 @@ def _conf_instance(self, instance_name): try: return self._vagrant.conf(vm_name=instance_name) except Exception: - msg = "Failed to get vagrant config for {}: See log file '{}'".format( - instance_name, - self._get_stderr_log(), - ) + msg = f"Failed to get vagrant config for {instance_name}: See log file '{self._get_stderr_log()}'" with open(self._get_stderr_log(), encoding="utf-8") as f: self.result["stderr"] = f.read() self._module.fail_json(msg=msg, **self.result) @@ -512,10 +509,7 @@ def _status_instance(self, instance_name): return {"name": s.name, "state": s.state, "provider": s.provider} except Exception: - msg = "Failed to get status for {}: See log file '{}'".format( - instance_name, - self._get_stderr_log(), - ) + msg = f"Failed to get status for {instance_name}: See log file '{self._get_stderr_log()}'" with open(self._get_stderr_log(), encoding="utf-8") as f: self.result["stderr"] = f.read() self._module.fail_json(msg=msg, **self.result)