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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user