changeset 2695:c5543fba97e8

core: fixed reactor crash by installing reactor only in makeService
author Goffi <goffi@goffi.org>
date Mon, 19 Nov 2018 23:46:50 +0100
parents a8ec00731ce7
children 5849dcaab99d
files twisted/plugins/sat_plugin.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/twisted/plugins/sat_plugin.py	Mon Nov 19 21:08:25 2018 +0100
+++ b/twisted/plugins/sat_plugin.py	Mon Nov 19 23:46:50 2018 +0100
@@ -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 @@
     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