From c91c00480bb3e52b974e8444017912bb2d3ac973 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 16 Dec 2024 16:45:43 +0800 Subject: [PATCH] test/pylib: do not check for self.cmd when tearing down ScyllaServer we already check `self.cmd` for null at the very beginning of the `ScyllaServer.stop()`, and in the `try` block, we don't reset `self.cmd`, hence there is no need to check it again. Signed-off-by: Kefu Chai --- test/pylib/scylla_cluster.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/pylib/scylla_cluster.py b/test/pylib/scylla_cluster.py index f987eaba161e..b707352160fa 100644 --- a/test/pylib/scylla_cluster.py +++ b/test/pylib/scylla_cluster.py @@ -714,8 +714,7 @@ async def stop(self) -> None: else: await self.cmd.wait() finally: - if self.cmd: - self.logger.info("stopped %s in %s", self, self.workdir.name) + self.logger.info("stopped %s in %s", self, self.workdir.name) self.cmd = None @stop_event