Global reformatting with black.
This commit is contained in:
parent
5ec4fdd787
commit
96bf3af324
68 changed files with 557 additions and 561 deletions
|
|
@ -36,6 +36,7 @@ def initialise(options):
|
|||
"""Method to initialise global modules"""
|
||||
# XXX: We need to configure logs before any log method is used, so here is the best place.
|
||||
from libervia.backend.core import log_config
|
||||
|
||||
log_config.libervia_configure(C.LOG_BACKEND_TWISTED, C, backend_data=options)
|
||||
|
||||
|
||||
|
|
@ -52,11 +53,13 @@ class LiberviaMaker:
|
|||
|
||||
def set_debugger(self):
|
||||
from twisted.internet import defer
|
||||
|
||||
if defer.Deferred.debug:
|
||||
# if we are in debug mode, we want to use ipdb instead of pdb
|
||||
try:
|
||||
import ipdb
|
||||
import pdb
|
||||
|
||||
pdb.set_trace = ipdb.set_trace
|
||||
pdb.post_mortem = ipdb.post_mortem
|
||||
except ImportError:
|
||||
|
|
@ -64,12 +67,14 @@ class LiberviaMaker:
|
|||
|
||||
def makeService(self, options):
|
||||
from twisted.internet import asyncioreactor
|
||||
|
||||
asyncioreactor.install()
|
||||
self.set_debugger()
|
||||
# XXX: Libervia must be imported after log configuration,
|
||||
# because it write stuff to logs
|
||||
initialise(options.parent)
|
||||
from libervia.backend.core.main import LiberviaBackend
|
||||
|
||||
return LiberviaBackend()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue