core (sat_main): avoid double init + log version

This commit is contained in:
Goffi 2020-01-10 10:22:46 +01:00
commit f2fc3bc186

View file

@ -56,7 +56,10 @@ except ImportError:
log = getLogger(__name__)
class SAT(service.Service):
def __init__(self):
def _init(self):
# we don't use __init__ to avoid doule initialisation with twistd
# this _init is called in startService
log.info(f"{C.APP_NAME} {self.full_version}")
self._cb_map = {} # map from callback_id to callbacks
self._menus = (
OrderedDict()
@ -534,6 +537,7 @@ class SAT(service.Service):
self.memory.purgeProfileSession(profile)
def startService(self):
self._init()
log.info("Salut à toi ô mon frère !")
def stopService(self):