diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-10-02 10:40:48 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-10-03 22:56:14 +0200 |
commit | aceb396e65fe024afb9adfb2d4646f96ecb985c3 (patch) | |
tree | c762b6465d0424941e0dabb891b6f16599580e96 | |
parent | 354b29ace32b19a1b40e46612349b8d76f00c0c6 (diff) |
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@redhat.com>
-rw-r--r-- | uitest/libreoffice/connection.py | 8 |
1 files 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() |