Mercurial > libervia-web
comparison 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 |
comparison
equal
deleted
inserted
replaced
1134:28789926852a | 1135:4426c328eb83 |
---|---|
17 # GNU Affero General Public License for more details. | 17 # GNU Affero General Public License for more details. |
18 | 18 |
19 # You should have received a copy of the GNU Affero General Public License | 19 # You should have received a copy of the GNU Affero General Public License |
20 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 20 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
21 | 21 |
22 from twisted.internet import gireactor | |
23 gireactor.install() | |
24 from twisted.internet import defer | 22 from twisted.internet import defer |
25 | 23 |
26 if defer.Deferred.debug: | 24 if defer.Deferred.debug: |
27 # if we are in debug mode, we want to use ipdb instead of pdb | 25 # if we are in debug mode, we want to use ipdb instead of pdb |
28 try: | 26 try: |
244 tapname = C.APP_NAME_FILE | 242 tapname = C.APP_NAME_FILE |
245 description = _(u"The web frontend of Salut à Toi") | 243 description = _(u"The web frontend of Salut à Toi") |
246 options = Options | 244 options = Options |
247 | 245 |
248 def makeService(self, options): | 246 def makeService(self, options): |
247 from twisted.internet import gireactor | |
248 gireactor.install() | |
249 for opt in OPT_PARAMETERS_BOTH: | 249 for opt in OPT_PARAMETERS_BOTH: |
250 # FIXME: that's a ugly way to get unicode in Libervia | 250 # FIXME: that's a ugly way to get unicode in Libervia |
251 # from command line or sat.conf | 251 # from command line or sat.conf |
252 # we should move to argparse and handle options this properly | 252 # we should move to argparse and handle options this properly |
253 try: | 253 try: |