core: fixed reactor crash by installing reactor only in makeService

This commit is contained in:
Goffi 2018-11-19 23:46:50 +01:00
commit f6d55c4603

View file

@ -17,8 +17,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from twisted.internet import gireactor
gireactor.install()
from twisted.internet import defer
if defer.Deferred.debug:
# if we are in debug mode, we want to use ipdb instead of pdb
@ -59,6 +57,8 @@ class SatMaker(object):
options = Options
def makeService(self, options):
from twisted.internet import gireactor
gireactor.install()
# XXX: SAT must be imported after log configuration, because it write stuff to logs
initialise(options.parent)
from sat.core.sat_main import SAT