]> git.openstreetmap.org Git - osqa.git/commitdiff
replacing tabs with spaces from a mail patch
authorjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Wed, 24 Aug 2011 11:33:45 +0000 (11:33 +0000)
committerjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Wed, 24 Aug 2011 11:33:45 +0000 (11:33 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1166 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/utils/mail.py

index 5f93b055338931dcd30f8f0b5bb4f76d128e6e12..8016b0034701deb5f5faf3d3d3c9f866adf57a39 100644 (file)
@@ -59,8 +59,8 @@ def create_and_send_mail_messages(messages):
             sender = str(settings.DEFAULT_FROM_EMAIL)
 
         for recipient, subject, html, text, media in messages:
-           if connection is None:
-               connection = create_connection()
+            if connection is None:
+                connection = create_connection()
 
             msgRoot = MIMEMultipart('related')
 
@@ -88,15 +88,15 @@ def create_and_send_mail_messages(messages):
 
             try:
                 connection.sendmail(sender, [recipient.email], msgRoot.as_string())
-           except SMTPRecipientsRefused, e:
-               logging.error("Email address not accepted.  Exception: %s" % e)
+            except SMTPRecipientsRefused, e:
+                logging.error("Email address not accepted.  Exception: %s" % e)
             except Exception, e:
                 logging.error("Couldn't send mail using the sendmail method: %s" % e)
-               try:
-                   connection.quit()
-                   connection = None
-               except Exception:
-                   connection = None
+                try:
+                    connection.quit()
+                    connection = None
+                except Exception:
+                    connection = None
 
         try:
             connection.quit()