cli: Python 3.14 compatibility fix

This commit is contained in:
Goffi 2026-04-24 17:06:20 +02:00
commit c37694c014

View file

@ -52,6 +52,13 @@ class LiberviaCLILoop:
# loop is used. If we end up using dbus, this shouldn't cause trouble.
from twisted.internet import asyncioreactor
# FIXME: Python 3.14 compatibility fix — see libervia/backend/core/launcher.py for details.
try:
asyncio.get_event_loop()
except RuntimeError:
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
asyncioreactor.install()
from twisted.internet import reactor