Tool: Pyflakes Processed Files: reviewboard/notifications/email.py Tool: PEP8 Style Checker Processed Files: reviewboard/notifications/email.py
Fix external email headers from a dict
Review Request #7861 — Created Jan. 12, 2016 and submitted
As described on latest Djblets implementation, there was an issue when an external headers was given to email.message().
a MultiValueDict must be instantiated when headers arg is a dict entries, however this change was not took into account because value was assigned to self._headers attributes instead of updating locale headers variable
This issue is also present in release-2.5.x
original call stackmessage.send() File "/usr/local/lib/python2.7/dist-packages/Django-220.127.116.11-py2.7.egg/django/core/mail/message.py", line 276, in send return self.get_connection(fail_silently).send_messages([self]) File "/usr/local/lib/python2.7/dist-packages/Django-18.104.22.168-py2.7.egg/django/core/mail/backends/smtp.py", line 94, in send_messages sent = self._send(message) File "/usr/local/lib/python2.7/dist-packages/Django-22.214.171.124-py2.7.egg/django/core/mail/backends/smtp.py", line 108, in _send message = email_message.message() File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.19-py2.7.egg/reviewboard/notifications/email.py", line 304, in message for name, value_list in self.rb_headers.iterlists(): AttributeError: 'dict' object has no attribute 'iterlists'
apply same fix on our test server, the extension responsible to send custom email does not raise anymore AttributeError issue