add else condition for twisted reactor
This commit is contained in:
parent
9b303b38c7
commit
c899ae0805
1 changed files with 9 additions and 1 deletions
|
@ -2,6 +2,15 @@ import sys
|
|||
from twisted.internet import asyncioreactor
|
||||
if 'twisted.internet.reactor' not in sys.modules:
|
||||
asyncioreactor.install()
|
||||
else:
|
||||
from twisted.internet import reactor
|
||||
if not isinstance(reactor, asyncioreactor.AsyncioSelectorReactor) and getattr(sys, 'frozen', False):
|
||||
# pyinstaller hooks install the default reactor before
|
||||
# any of our code runs, see kivy for similar problem:
|
||||
# https://github.com/kivy/kivy/issues/4182
|
||||
del sys.modules['twisted.internet.reactor']
|
||||
asyncioreactor.install()
|
||||
from twisted.internet import reactor
|
||||
|
||||
import keyring.backend
|
||||
import platform
|
||||
|
@ -81,7 +90,6 @@ keyring.set_keyring(LbryAndroidKeyring())
|
|||
|
||||
import logging.handlers
|
||||
from lbrynet.core import log_support
|
||||
from twisted.internet import defer, reactor
|
||||
|
||||
from lbrynet import analytics
|
||||
from lbrynet import conf
|
||||
|
|
Loading…
Reference in a new issue