mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-05-29 02:03:25 +03:00
do not discard ImportError message in ImageFont
This commit is contained in:
parent
1f0573f2d6
commit
b18efc775d
|
@ -54,17 +54,12 @@ def __getattr__(name):
|
||||||
raise AttributeError(msg)
|
raise AttributeError(msg)
|
||||||
|
|
||||||
|
|
||||||
class _ImagingFtNotInstalled:
|
|
||||||
# module placeholder
|
|
||||||
def __getattr__(self, id):
|
|
||||||
msg = "The _imagingft C module is not installed"
|
|
||||||
raise ImportError(msg)
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from . import _imagingft as core
|
from . import _imagingft as core
|
||||||
except ImportError:
|
except ImportError as ex:
|
||||||
core = _ImagingFtNotInstalled()
|
from ._util import DeferredError
|
||||||
|
|
||||||
|
core = DeferredError(ex)
|
||||||
|
|
||||||
|
|
||||||
_UNSPECIFIED = object()
|
_UNSPECIFIED = object()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user