From f2fc3bc1868c3b17f4ca2f82ae6f697c3baea9c6 Mon Sep 17 00:00:00 2001 From: Goffi Date: Fri, 10 Jan 2020 10:22:46 +0100 Subject: [PATCH] core (sat_main): avoid double init + log version --- sat/core/sat_main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sat/core/sat_main.py b/sat/core/sat_main.py index e90143f9..959706ef 100644 --- a/sat/core/sat_main.py +++ b/sat/core/sat_main.py @@ -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):