Convert: Move initalization of Pillow

Pillow was being initialized on import. This commit
moves the initialization to the __init__ method of the
Python backend subclass.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2018-12-08 16:33:35 -04:00
parent fad2ae3683
commit 2f3d640799

View File

@@ -54,7 +54,6 @@ try:
except sh.CommandNotFound:
pdfinfo = None
Image.init()
logger = logging.getLogger(__name__)
@@ -69,6 +68,9 @@ class IteratorIO(object):
class Python(ConverterBase):
def __init__(self, *args, **kwargs):
super(Python, self).__init__(*args, **kwargs)
Image.init()
def convert(self, *args, **kwargs):
super(Python, self).convert(*args, **kwargs)