From be71e660fd29a714466bf041a6b9b394b9fdbf08 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Mon, 16 Oct 2023 15:18:11 +0300 Subject: Fix UITests on Windows ... after commit 0d21e1075f0288a007cb427ce508d6fbbf8503dd (uitest: add signal_handler function, 2023-10-04), which added handlers unconditionally, for signals unavailable on Windows. Change-Id: I8b177c4110f869781b2501ee6f15ae7ff4862a94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158050 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- uitest/libreoffice/connection.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'uitest') diff --git a/uitest/libreoffice/connection.py b/uitest/libreoffice/connection.py index e3b76b4baf44..4f901130f223 100644 --- a/uitest/libreoffice/connection.py +++ b/uitest/libreoffice/connection.py @@ -10,6 +10,7 @@ import time import traceback import uuid import os +import platform import signal try: @@ -37,8 +38,9 @@ class OfficeConnection: If the connection method is path the instance will be created as a new subprocess. If the connection method is connect the instance tries to connect to an existing instance with the specified socket string """ - signal.signal(signal.SIGCHLD, signal_handler) - signal.signal(signal.SIGPIPE, signal_handler) + if platform.system() != "Windows": + signal.signal(signal.SIGCHLD, signal_handler) + signal.signal(signal.SIGPIPE, signal_handler) (method, sep, rest) = self.args["--soffice"].partition(":") if sep != ":": -- cgit