From abe1975e00bf3e2a0e3f1aeb93ac0fac902b7949 Mon Sep 17 00:00:00 2001 From: Hugo Date: Sun, 5 Nov 2017 19:25:52 +0200 Subject: [PATCH] Replace PIL.OleFileIO warning with descriptive ImportError --- PIL/OleFileIO.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/PIL/OleFileIO.py b/PIL/OleFileIO.py index 2d6aeb85c..b3caa10d5 100644 --- a/PIL/OleFileIO.py +++ b/PIL/OleFileIO.py @@ -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