merge bookmark @

This commit is contained in:
Goffi 2021-09-08 11:20:37 +02:00
commit 50d7cb2a51

View file

@ -228,11 +228,7 @@ class SAT(service.Service):
ui_contact_list.ContactList(self)
ui_profile_manager.ProfileManager(self)
except Exception as e:
log.error(
_("Could not initialize backend: {reason}").format(
reason=str(e).decode("utf-8", "ignore")
)
)
log.error(f"Could not initialize backend: {e}")
sys.exit(1)
self._addBaseMenus()
@ -344,6 +340,12 @@ class SAT(service.Service):
plugin_modes = plugin_info["modes"] = set(
plugin_info.setdefault("modes", C.PLUG_MODE_DEFAULT)
)
if not plugin_modes.intersection(C.PLUG_MODE_BOTH):
log.error(
f"Can't import plugin at {plugin_path}, invalid {C.PI_MODES!r} "
f"value: {plugin_modes!r}"
)
continue
# if the plugin is an entry point, it must work in component mode
if plugin_info["type"] == C.PLUG_TYPE_ENTRY_POINT: