From 2f3d6407993f801f5b71359a08c2c165f9e81ac2 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Sat, 8 Dec 2018 16:33:35 -0400 Subject: [PATCH] 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 --- mayan/apps/converter/backends/python.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mayan/apps/converter/backends/python.py b/mayan/apps/converter/backends/python.py index 70249ce69e..fd6243a48a 100644 --- a/mayan/apps/converter/backends/python.py +++ b/mayan/apps/converter/backends/python.py @@ -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)