Skip to content

Commit 57fff05

Browse files
committed
maybe
1 parent 7a69492 commit 57fff05

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pytest_twisted.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,14 @@ def init_asyncio_reactor():
400400

401401
def _install_reactor(reactor_installer, reactor_type):
402402
"""Install the specified reactor and create the greenlet."""
403-
try:
403+
# TODO: maybe fix this in qt5reactor? btw, it avoids creating a second
404+
# qt5reactor.core.QtEventReactor and this somehow fixes the hang
405+
# that showed up in 5.15.0.
406+
# try:
407+
if 'twisted.internet.reactor' not in sys.modules:
404408
reactor_installer()
405-
except error.ReactorAlreadyInstalledError:
409+
# except error.ReactorAlreadyInstalledError:
410+
else:
406411
import twisted.internet.reactor
407412

408413
if not isinstance(twisted.internet.reactor, reactor_type):

0 commit comments

Comments
 (0)