diff --git a/dockertidy/autostop.py b/dockertidy/autostop.py index eb85da0..18594e6 100644 --- a/dockertidy/autostop.py +++ b/dockertidy/autostop.py @@ -58,9 +58,9 @@ class AutoStop: try: client.stop(cid) except requests.exceptions.Timeout as e: - self.logger.warning(f"Failed to stop container {cid}: {str(e)}") + self.logger.warning(f"Failed to stop container {cid}: {e!s}") except docker.errors.APIError as e: - self.logger.warning(f"Error stopping {cid}: {str(e)}") + self.logger.warning(f"Error stopping {cid}: {e!s}") def _build_container_matcher(self, prefixes):