forked from LBRYCommunity/lbry-sdk
don't delete the reactor from sys.modules unless in a build
This commit is contained in:
parent
673d259d7a
commit
7dcebf99e0
1 changed files with 2 additions and 1 deletions
|
@ -4,12 +4,13 @@ if 'twisted.internet.reactor' not in sys.modules:
|
|||
asyncioreactor.install()
|
||||
else:
|
||||
from twisted.internet import reactor
|
||||
if not isinstance(reactor, asyncioreactor.AsyncioSelectorReactor):
|
||||
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 json
|
||||
import asyncio
|
||||
|
|
Loading…
Reference in a new issue