void-packages/srcpkgs/speech-dispatcher/patches/0001-Fix-crash-with-python-...

30 lines
1.1 KiB
Diff

From 4fe066fefcbb28161b1053326867514a21f421b9 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@gnome.org>
Date: Fri, 11 Sep 2020 13:15:07 -0500
Subject: [PATCH] Fix crash with python 3.9
Thread.isAlive() was removed in python 3.9. Thread.is_alive() has been
available since python 2.6, so let's use that.
Fixes #402
---
src/api/python/speechd/client.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/api/python/speechd/client.py b/src/api/python/speechd/client.py
index ba7c0496..68200e2f 100644
--- src/api/python/speechd/client.py
+++ src/api/python/speechd/client.py
@@ -289,7 +289,7 @@ class _SSIP_Connection(object):
and return the triplet (code, msg, data)."""
# TODO: This check is dumb but seems to work. The main thread
# hangs without it, when the Speech Dispatcher connection is lost.
- if not self._communication_thread.isAlive():
+ if not self._communication_thread.is_alive():
raise SSIPCommunicationError
self._ssip_reply_semaphore.acquire()
# The list is sorted, read the first item
--
2.28.0