mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-05-08 08:58:31 +01:00
Make plugin more robust (#1881)
This commit is contained in:
@@ -60,8 +60,9 @@ class PluginManager(CoreSysAttributes):
|
||||
):
|
||||
try:
|
||||
await plugin.load()
|
||||
except Exception: # pylint: disable=broad-except
|
||||
except Exception as err: # pylint: disable=broad-except
|
||||
_LOGGER.warning("Can't load plugin %s", type(plugin).__name__)
|
||||
self.sys_capture_exception(err)
|
||||
|
||||
# Check requirements
|
||||
for plugin, required_version in (
|
||||
@@ -95,6 +96,9 @@ class PluginManager(CoreSysAttributes):
|
||||
type(plugin).__name__,
|
||||
required_version,
|
||||
)
|
||||
except Exception as err: # pylint: disable=broad-except
|
||||
_LOGGER.warning("Can't update plugin %s", type(plugin).__name__)
|
||||
self.sys_capture_exception(err)
|
||||
|
||||
async def repair(self) -> None:
|
||||
"""Repair Supervisor plugins."""
|
||||
@@ -122,5 +126,6 @@ class PluginManager(CoreSysAttributes):
|
||||
):
|
||||
try:
|
||||
await plugin.stop()
|
||||
except Exception: # pylint: disable=broad-except
|
||||
except Exception as err: # pylint: disable=broad-except
|
||||
_LOGGER.warning("Can't stop plugin %s", type(plugin).__name__)
|
||||
self.sys_capture_exception(err)
|
||||
|
||||
Reference in New Issue
Block a user