]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/vstart_runner: add missing poll method
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 19 Apr 2024 03:31:07 +0000 (23:31 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 30 Apr 2024 20:58:01 +0000 (16:58 -0400)
Otherwise you cannot use LocalDaemon.check_status.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 9748d0c465f88a5118bf3c694fc5e33116229d12)

qa/tasks/vstart_runner.py

index 4fcd0cfe1bb198ec1aea5542996f0ec6bb031e9d..8e45b45d65d9f9890e61e0f8d00a3dd10768354f 100644 (file)
@@ -280,6 +280,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: