Skip to content

Commit

Permalink
logging when problem with register plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Czaki committed Aug 9, 2024
1 parent 90310a2 commit c6b6375
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion package/PartSeg/plugins/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import contextlib
import importlib
import logging
import os
import pkgutil
import sys
Expand All @@ -20,7 +21,10 @@ def register_napari_plugins(): # pragma: no cover
)
base_path = Path(__file__).parent.parent.parent / "plugins"
for el in base_path.glob("*/napari.yaml"):
npe2.PluginManager.instance().register(str(el))
try:
npe2.PluginManager.instance().register(str(el))
except Exception: # noqa: PERF203
logging.exception("Failed to register %s", el)


def get_plugins():
Expand Down

0 comments on commit c6b6375

Please sign in to comment.