Rev 33: Don't include the In-Reply-To if it is empty in http://bzr.arbash-meinel.com/plugins/email

John Arbash Meinel john at arbash-meinel.com
Tue Mar 18 17:19:58 GMT 2008


At http://bzr.arbash-meinel.com/plugins/email

------------------------------------------------------------
revno: 33
revision-id: john at arbash-meinel.com-20080318171813-m2k58db5kds18v7w
parent: john at arbash-meinel.com-20080318171408-1v4tqgu9d45vhzlm
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: email
timestamp: Tue 2008-03-18 12:18:13 -0500
message:
  Don't include the In-Reply-To if it is empty
modified:
  emailer.py                     emailer.py-20070123220937-ec5y2n2oeoa0p4ue-1
-------------- next part --------------
=== modified file 'emailer.py'
--- a/emailer.py	2008-03-18 17:14:08 +0000
+++ b/emailer.py	2008-03-18 17:18:13 +0000
@@ -231,10 +231,13 @@
             to_addrs = [to_addrs]
         extra_headers = None
         if self.should_include_message_id():
-            extra_headers = {'Message-Id': self.message_id(),
-                             'In-Reply-To': self.in_reply_to(),
-                             'References': self.references(),
-                            }
+            extra_headers = {'Message-Id': self.message_id()}
+            in_reply_to = self.in_reply_to()
+            if in_reply_to is not None:
+                extra_headers['In-Reply-to'] = in_reply_to
+            references = self.references()
+            if references is not None:
+                extra_headers['References'] = references
 
         smtp = self._smtplib_implementation(self.config)
         smtp.send_text_and_attachment_email(from_addr, to_addrs,



More information about the bazaar-commits mailing list