# HG changeset patch # User Goffi # Date 1578648166 -3600 # Node ID 3fcc99b2d6b72354d2f299c235cf1625a30fa3a9 # Parent 6844b2d18ebacdde0844f16634868f5a06e215b5 core (sat_main): avoid double init + log version diff -r 6844b2d18eba -r 3fcc99b2d6b7 sat/core/sat_main.py --- a/sat/core/sat_main.py Fri Jan 10 10:10:42 2020 +0100 +++ b/sat/core/sat_main.py Fri Jan 10 10:22:46 2020 +0100 @@ -56,7 +56,10 @@ 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 @@ self.memory.purgeProfileSession(profile) def startService(self): + self._init() log.info("Salut à toi ô mon frère !") def stopService(self):