mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 10:46:16 +03:00
fix: use parent_name instead of parent_module
This commit is contained in:
parent
6825a76692
commit
b235aa98c6
|
@ -355,11 +355,11 @@ def init():
|
|||
if _initialized >= 2:
|
||||
return 0
|
||||
|
||||
parent_module, _, _ = __name__.rpartition(".")
|
||||
parent_name = __name__.rpartition(".")[0]
|
||||
for plugin in _plugins:
|
||||
try:
|
||||
logger.debug("Importing %s", plugin)
|
||||
__import__(f"{parent_module}.{plugin}", globals(), locals(), [])
|
||||
__import__(f"{parent_name}.{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