From aceb396e65fe024afb9adfb2d4646f96ecb985c3 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 2 Oct 2019 10:40:48 +0200 Subject: [PATCH] Propagate soffice process failure from OfficeConnection's tearDown ...which had gone missing with 98cbfb087eed0d1defa6ef26385fcf47f95c05fc "uitest: kill the LibreOffice instance if it ignores terminate request". (None != 0 is true, so there is no need to map from ret_attr to ret, and that code can be cleaned up a bit.) Change-Id: Ic5e429d61a10a2bbd5c28aeee9d8465cb05c1e4a Reviewed-on: https://gerrit.libreoffice.org/80147 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- uitest/libreoffice/connection.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/uitest/libreoffice/connection.py b/uitest/libreoffice/connection.py index 9e145c98a686..5beb1831820c 100644 --- a/uitest/libreoffice/connection.py +++ b/uitest/libreoffice/connection.py @@ -134,14 +134,12 @@ class OfficeConnection: time_ = 0 while time_ < 30: time_ += DEFAULT_SLEEP - ret_attr = self.soffice.poll() - if ret_attr is not None: + ret = self.soffice.poll() + if ret is not None: break time.sleep(DEFAULT_SLEEP) - ret = 0 - if ret_attr is None: - ret = 1 + if ret is None: self.soffice.terminate() # ret = self.soffice.wait()