diff data/plugin/action/submitemail.py @ 623:5f499a634857

FormSubmit: fix pep8, remove unused imports, ...
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 25 Mar 2013 17:20:34 +0100
parents 12465aa315be
children bdebdc59b057
line wrap: on
line diff
--- a/data/plugin/action/submitemail.py	Mon Mar 25 17:09:15 2013 +0100
+++ b/data/plugin/action/submitemail.py	Mon Mar 25 17:20:34 2013 +0100
@@ -9,8 +9,6 @@
     @license: GNU GPL, see COPYING for details.
 """
 
-import os, sys, codecs
-
 from MoinMoin import wikiutil
 from MoinMoin.action import ActionBase
 from MoinMoin.Page import Page
@@ -18,9 +16,11 @@
 
 from submitbase import SubmitBase
 
+
 def execute(pagename, request):
     submitemail(pagename, request).render()
 
+
 class submitemail(SubmitBase):          
     
     def __init__(self, pagename, request):
@@ -39,8 +39,7 @@
             index = self.labels.index(label)
             label = label.decode('utf-8')
             value = self.values[index]
-            text += "%(label)s: %(value)s \n" % {'label': label, 'value':value}
-        
+            text += "%(label)s: %(value)s \n" % {'label': label, 'value': value}
         return text
         
     def submit(self):
@@ -48,6 +47,5 @@
         text = self.build_content()
         status, msg = sendmail(self.request, self.targetemail, self.subject, text, mail_from=self.targetemail)
         self.msg = self._(msg)
-        if status!=1:
+        if status != 1:
             raise Exception(self.msg)
-