From d97b080586fb15af0e7786a3e8f7245fd2e89c56 Mon Sep 17 00:00:00 2001 From: Eric Riggs Date: Thu, 26 Apr 2018 02:17:33 -0400 Subject: [PATCH] Flanker is not thread safe, hide the import until it is actually needed. Signed-off-by: Eric Riggs --- mayan/apps/sources/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mayan/apps/sources/models.py b/mayan/apps/sources/models.py index 75b828f885..08872b2bb9 100644 --- a/mayan/apps/sources/models.py +++ b/mayan/apps/sources/models.py @@ -7,7 +7,6 @@ import os import poplib import subprocess -from flanker import mime import yaml from django.core.exceptions import ValidationError @@ -553,6 +552,8 @@ class EmailBaseModel(IntervalBaseModel): @staticmethod def process_message(source, message_text): + from flanker import mime + counter = 1 message = mime.from_string(force_str(message_text)) metadata_dictionary = {}