[Libreoffice-commits] core.git: uitest/libreoffice

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Thu Oct 3 20:57:39 UTC 2019


 uitest/libreoffice/connection.py |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit aceb396e65fe024afb9adfb2d4646f96ecb985c3
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Oct 2 10:40:48 2019 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Oct 3 22:56:14 2019 +0200

    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 <sbergman at redhat.com>

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()


More information about the Libreoffice-commits mailing list