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

Markus Mohrhard markus.mohrhard at googlemail.com
Mon Feb 27 23:31:48 UTC 2017


 uitest/uitest/framework.py |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 08750abc64a7ad82cac96adeb7a0bcdce7ac704d
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Feb 27 16:25:22 2017 +0100

    uitest: catch more exceptions during shutdown
    
    Change-Id: Ie4bfc28c32b4b21c75ca92b95521c03a0683db32
    Reviewed-on: https://gerrit.libreoffice.org/34692
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/uitest/uitest/framework.py b/uitest/uitest/framework.py
index f21d72b..7149132 100644
--- a/uitest/uitest/framework.py
+++ b/uitest/uitest/framework.py
@@ -35,13 +35,13 @@ class UITestCase(unittest.TestCase):
             t = time.time() - self.startTime
             print("Execution time for %s: %.3f" % (self.id(), t))
             if self.xContext is not None:
-                desktop = self.ui_test.get_desktop()
-                components = desktop.getComponents()
-                for component in components:
-                    try:
-                        component.close(False)
-                    except Exception as e:
-                        print(e)
+                try:
+                    desktop = self.ui_test.get_desktop()
+                    components = desktop.getComponents()
+                    for component in components:
+                            component.close(False)
+                except Exception as e:
+                    print(e)
 
             self.connection.tearDown()
         finally:


More information about the Libreoffice-commits mailing list