diff --git a/HISTORY.rst b/HISTORY.rst index d1ab79834f..f73aff3679 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -74,6 +74,8 @@ * Move language choices generation to documents.utils. * Remove support for generating documents images in base 64 format. +* Move Pillow initialization from the module to the backend + class initialization. 3.1.11 (2019-04-XX) =================== diff --git a/docs/releases/3.2.rst b/docs/releases/3.2.rst index ed40babb73..b4af1381ad 100644 --- a/docs/releases/3.2.rst +++ b/docs/releases/3.2.rst @@ -106,6 +106,8 @@ Other changes * Move language choices generation to documents.utils. * Remove support for generating documents images in base 64 format. +* Move Pillow initialization from the module to the backend + class initialization. Removals -------- diff --git a/mayan/apps/converter/backends/python.py b/mayan/apps/converter/backends/python.py index cb1a72d05e..23635b7364 100644 --- a/mayan/apps/converter/backends/python.py +++ b/mayan/apps/converter/backends/python.py @@ -67,7 +67,6 @@ try: except sh.CommandNotFound: pdfinfo = None -Image.init() logger = logging.getLogger(__name__) @@ -82,6 +81,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)