mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2024-10-01 03:35:38 -04:00
ui: Simplify the ui support detection logic.
This commit is contained in:
parent
bb9cda8902
commit
872267073b
@ -14,7 +14,10 @@
|
||||
|
||||
from importlib import util
|
||||
|
||||
if util.find_spec("pybdubs") and util.find_spec("gi.repository"):
|
||||
UI_ENABLED = (util.find_spec("gi.repository") is not None
|
||||
and util.find_spec("pydbus") is not None)
|
||||
|
||||
if UI_ENABLED:
|
||||
from collections import defaultdict
|
||||
from queue import Empty
|
||||
|
||||
@ -579,6 +582,3 @@ if util.find_spec("pybdubs") and util.find_spec("gi.repository"):
|
||||
if self.loop:
|
||||
self.loop.quit()
|
||||
self.loop = None
|
||||
|
||||
else:
|
||||
UI_ENABLED = False
|
||||
|
Loading…
Reference in New Issue
Block a user