changeset 7982:4b7909501c5c

celerylib: use email.utils instead of deprecated rfc822 module
author Mads Kiilerich <mads@kiilerich.com>
date Thu, 21 Nov 2019 12:44:42 +0100
parents f9b1c7d12beb
children b075693b3214
files kallithea/lib/celerylib/tasks.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/celerylib/tasks.py	Mon Nov 11 00:20:43 2019 +0100
+++ b/kallithea/lib/celerylib/tasks.py	Thu Nov 21 12:44:42 2019 +0100
@@ -26,9 +26,9 @@
 :license: GPLv3, see LICENSE.md for more details.
 """
 
+import email.utils
 import logging
 import os
-import rfc822
 import traceback
 from collections import OrderedDict
 from operator import itemgetter
@@ -282,7 +282,7 @@
         # extract the e-mail address.
         envelope_addr = author_email(envelope_from)
         headers['From'] = '"%s" <%s>' % (
-            rfc822.quote('%s (no-reply)' % author.full_name_or_username),
+            email.utils.quote('%s (no-reply)' % author.full_name_or_username),
             envelope_addr)
 
     user = email_config.get('smtp_username')