Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/openalea/core/formatting/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ def icon_path(filepath, default=None, paths=None, packages=None):
if packages is None:
packages = []
# Search filename in all paths given by user
_paths = [Path(filepath)] + [Path(p) / filepath for p in paths]
_paths = [Path(str(filepath))] + [Path(str(p)) / filepath for p in paths]

# Search icons generated by oalab
_paths += [Path(p) / '._icon.png' for p in paths]
_paths += [Path(str(p)) / '._icon.png' for p in paths]

# If a path is found, try to find absolute path
# Try to get icon path from object
Expand Down
5 changes: 4 additions & 1 deletion src/openalea/core/resources/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import importlib_resources as resources
try:
from importlib import resources
except ImportError:
import importlib_resources as resources

resources_dir = resources.files(__name__)
Loading