diff twisted/plugins/libervia_server.py @ 1135:4426c328eb83

core: fixed reactor crash by installing reactor only in makeService
author Goffi <goffi@goffi.org>
date Tue, 20 Nov 2018 08:54:49 +0100
parents 0cafb79ced6d
children 49ff1330c9d0
line wrap: on
line diff
--- a/twisted/plugins/libervia_server.py	Wed Oct 03 21:01:42 2018 +0200
+++ b/twisted/plugins/libervia_server.py	Tue Nov 20 08:54:49 2018 +0100
@@ -19,8 +19,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:
@@ -246,6 +244,8 @@
     options = Options
 
     def makeService(self, options):
+        from twisted.internet import gireactor
+        gireactor.install()
         for opt in OPT_PARAMETERS_BOTH:
             # FIXME: that's a ugly way to get unicode in Libervia
             #        from command line or sat.conf