From: Patrick Donnelly Date: Fri, 19 Apr 2024 03:31:07 +0000 (-0400) Subject: qa/tasks/vstart_runner: add missing poll method X-Git-Tag: testing/wip-mchangir-testing-20250303.143918-reef-debug~1^2~4 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=fd8ea7ba82ea77a498dca2bec2df324c59de9c81;p=ceph-ci.git qa/tasks/vstart_runner: add missing poll method Otherwise you cannot use LocalDaemon.check_status. Signed-off-by: Patrick Donnelly (cherry picked from commit 9748d0c465f88a5118bf3c694fc5e33116229d12) --- diff --git a/qa/tasks/vstart_runner.py b/qa/tasks/vstart_runner.py index 1c1a2a96398..db856537d8b 100644 --- a/qa/tasks/vstart_runner.py +++ b/qa/tasks/vstart_runner.py @@ -273,6 +273,16 @@ class LocalRemoteProcess(object): else: return False + def poll(self): + if self.finished: + if self.exitstatus is not None: + if self.check_status and self.exitstatus != 0: + raise CommandFailedError(self.args, self.exitstatus) + else: + return self.exitstatus + else: + return None + def kill(self): log.debug("kill ") if self.subproc.pid and not self.finished: