From d28162f170950355939c32b6e4fe3180bebaa75d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Cl=C3=A9ment=20Tosi?= Date: Fri, 20 May 2022 13:24:51 +0100 Subject: [PATCH] tools: Command: Fix always-True validation in ctor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of testing the truthiness of the method (always True), call it. BUG=b:233346153 TEST=tools/dev_container bash -c 'echo Hello' Change-Id: I761d848ea3811ff721420de8f4b626e11288acee Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3649552 Auto-Submit: Pierre-Clément Tosi Reviewed-by: Dennis Kempin Tested-by: kokoro Commit-Queue: Dennis Kempin --- tools/impl/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/impl/common.py b/tools/impl/common.py index 074c2cecd8..9baffd85dd 100644 --- a/tools/impl/common.py +++ b/tools/impl/common.py @@ -126,7 +126,7 @@ class Command(object): self.env_vars = env_vars if len(self.args) > 0: executable = self.args[0] - if Path(executable).exists: + if Path(executable).exists(): self.executable = Path(executable) else: path = shutil.which(executable)