mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 10:16:17 +03:00
Better import of _imaging
This commit is contained in:
parent
e0aab1ecfd
commit
f466def82d
|
@ -51,9 +51,7 @@ try:
|
||||||
# the "open" function to identify files, but you cannot load
|
# the "open" function to identify files, but you cannot load
|
||||||
# them. Note that other modules should not refer to _imaging
|
# them. Note that other modules should not refer to _imaging
|
||||||
# directly; import Image and use the Image.core variable instead.
|
# directly; import Image and use the Image.core variable instead.
|
||||||
import _imaging
|
import _imaging as core
|
||||||
core = _imaging
|
|
||||||
del _imaging
|
|
||||||
except ImportError, v:
|
except ImportError, v:
|
||||||
core = _imaging_not_installed()
|
core = _imaging_not_installed()
|
||||||
if str(v)[:20] == "Module use of python" and warnings:
|
if str(v)[:20] == "Module use of python" and warnings:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user