mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 04:07:21 +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)
|
||||
|
||||
|
||||
class _ImagingFtNotInstalled:
|
||||
# module placeholder
|
||||
def __getattr__(self, id):
|
||||
msg = "The _imagingft C module is not installed"
|
||||
raise ImportError(msg)
|
||||
|
||||
|
||||
try:
|
||||
from . import _imagingft as core
|
||||
except ImportError:
|
||||
core = _ImagingFtNotInstalled()
|
||||
except ImportError as ex:
|
||||
from ._util import DeferredError
|
||||
|
||||
core = DeferredError(ex)
|
||||
|
||||
|
||||
_UNSPECIFIED = object()
|
||||
|
|
Loading…
Reference in New Issue
Block a user