comparison sat/core/sat_main.py @ 3649:4a89342476e9

core (sat_main): fix the "Could not initialize backend" error logging
author Goffi <goffi@goffi.org>
date Wed, 08 Sep 2021 11:16:29 +0200
parents 3c7a64d6f49f
children 760f3ff05092
comparison
equal deleted inserted replaced
3648:71cfe9334f73 3649:4a89342476e9
216 try: 216 try:
217 self._import_plugins() 217 self._import_plugins()
218 ui_contact_list.ContactList(self) 218 ui_contact_list.ContactList(self)
219 ui_profile_manager.ProfileManager(self) 219 ui_profile_manager.ProfileManager(self)
220 except Exception as e: 220 except Exception as e:
221 log.error( 221 log.error(f"Could not initialize backend: {e}")
222 _("Could not initialize backend: {reason}").format(
223 reason=str(e).decode("utf-8", "ignore")
224 )
225 )
226 sys.exit(1) 222 sys.exit(1)
227 self._addBaseMenus() 223 self._addBaseMenus()
228 224
229 self.initialised.callback(None) 225 self.initialised.callback(None)
230 log.info(_("Backend is ready")) 226 log.info(_("Backend is ready"))