Replace PIL.OleFileIO warning with descriptive ImportError

This commit is contained in:
Hugo 2017-11-05 19:25:52 +02:00
parent af06b6322c
commit abe1975e00

View File

@ -1,12 +1,4 @@
import warnings
warnings.warn(
raise ImportError(
'PIL.OleFileIO is deprecated. Use the olefile Python package '
'instead. This module will be removed in a future version.',
DeprecationWarning
'instead. This module will be removed in a future version.'
)
import olefile
import sys
sys.modules[__name__] = olefile