mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 04:07:21 +03:00
fix: Importing plugins from a user-specified installation directory
[pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci fix: Wrong path replacement [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci fix: typo
This commit is contained in:
parent
f9c7bd8611
commit
6825a76692
|
@ -355,10 +355,11 @@ def init():
|
|||
if _initialized >= 2:
|
||||
return 0
|
||||
|
||||
parent_module, _, _ = __name__.rpartition(".")
|
||||
for plugin in _plugins:
|
||||
try:
|
||||
logger.debug("Importing %s", plugin)
|
||||
__import__(f"PIL.{plugin}", globals(), locals(), [])
|
||||
__import__(f"{parent_module}.{plugin}", globals(), locals(), [])
|
||||
except ImportError as e:
|
||||
logger.debug("Image: failed to import %s: %s", plugin, e)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user