[Nym3-commit] r480 - trunk/nymbaron

laurent at conuropsis.org laurent at conuropsis.org
Thu Mar 16 16:05:52 CET 2006


Author: laurent
Date: 2006-03-16 16:05:51 +0100 (Thu, 16 Mar 2006)
New Revision: 480

Modified:
   trunk/nymbaron/Mail.py
Log:
Style

Modified: trunk/nymbaron/Mail.py
===================================================================
--- trunk/nymbaron/Mail.py	2006-03-16 13:12:52 UTC (rev 479)
+++ trunk/nymbaron/Mail.py	2006-03-16 15:05:51 UTC (rev 480)
@@ -173,25 +173,25 @@
     a castrated RFC822."""
     # Make a From header and include the nymholder as a real_name.
     fromhdr = '%s <%s@%s>' % (nym, nym, sname)
-    mainMsg=email.Message.Message()
+    mainMsg = email.Message.Message()
     mainMsg["To"] = you
     mainMsg["From"] = fromhdr
     if abuse:
         mainMsg['X-Abuse-Contact'] = abuse
     # Create a Date header using UTC
-    mainMsg["Date"]=email.Utils.formatdate(localtime=0)
+    mainMsg["Date"] = email.Utils.formatdate(localtime=0)
     # Do we want to generate a Message-ID, or let the MTA handle it?
     #mainMsg["Message-ID"]=email.Utils.make_msgid()
 
     msg = email.message_from_string(body)
     filter_header(msg)
     if msg.is_multipart():
-        mainMsg["Mime-version"]="1.0"
-        mainMsg["Content-type"]="Multipart/mixed"
-        mainMsg.preamble="This is a multipart message in MIME format\n"
-        mainMsg.epilogue="" # To ensure that message ends with newline
+        mainMsg["Mime-version"] = "1.0"
+        mainMsg["Content-type"] = "Multipart/mixed"
+        mainMsg.preamble = "This is a multipart message in MIME format\n"
+        mainMsg.epilogue = "" # To ensure that message ends with newline
         for part in msg.walk():
-            subMsg=email.Message.Message()
+            subMsg = email.Message.Message()
             if part.get_main_type() == "multipart":
                 continue
             type = part.get_content_type()
@@ -202,11 +202,11 @@
             if type:
                 subMsg["Content-type"] = type
             if name:
-                subMsg.set_param("name",name)
+                subMsg.set_param("name", name)
             if desc:
-                subMsg.add_header("Content-Description",desc)
+                subMsg.add_header("Content-Description", desc)
             if dispos:
-                subMsg.add_header("Content-Disposition",dispos)
+                subMsg.add_header("Content-Disposition", dispos)
             subMsg.set_payload(payload)
             mainMsg.attach(subMsg)
     else:



More information about the Nym3-commit mailing list