Initialize Pillow inside ConverterBase __init__
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -81,10 +81,6 @@ 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)
|
||||
|
||||
|
||||
@@ -96,6 +96,7 @@ class ConverterBase(object):
|
||||
file_object=file_object, mimetype_only=False
|
||||
)[0]
|
||||
self.soffice_file = None
|
||||
Image.init()
|
||||
|
||||
def to_pdf(self):
|
||||
if self.mime_type in CONVERTER_OFFICE_FILE_MIMETYPES:
|
||||
|
||||
Reference in New Issue
Block a user