diff MoinMoin/action/AttachFile.py @ 2286:01f05e74aa9c

Big PEP8 and whitespace cleanup
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 02 Jul 2007 23:33:20 +0200
parents 316bbfb37f2b
children bb76818db210 10be78f1fa97
line wrap: on
line diff
--- a/MoinMoin/action/AttachFile.py	Mon Jul 02 20:46:01 2007 +0200
+++ b/MoinMoin/action/AttachFile.py	Mon Jul 02 23:33:20 2007 +0200
@@ -206,7 +206,7 @@
     fpath = os.path.join(attach_dir, target).encode(config.charset)
     exists = os.path.exists(fpath)
     if exists and not overwrite:
-        msg = _("Attachment '%(target)s' already exists.") % { 'target': target, }
+        msg = _("Attachment '%(target)s' already exists.") % {'target': target, }
     else:
         if exists:
             try:
@@ -220,7 +220,7 @@
             stream.close()
 
         _addLogEntry(request, 'ATTNEW', pagename, target)
-        
+
         event = FileAttachedEvent(request, pagename, target, len(filecontent))
         messages = send_event(event)
         msg = "".join(messages)
@@ -612,7 +612,7 @@
         else:
             msg = _('You are not allowed to view attachments of this page.')
     else:
-        msg = _('Unsupported upload action: %s') % (wikiutil.escape(do),)
+        msg = _('Unsupported upload action: %s') % (wikiutil.escape(do), )
 
     if msg:
         error_msg(pagename, request, msg)
@@ -752,7 +752,7 @@
             return
 
         if new_attachment_path != attachment_path:
-        # move file  
+        # move file
             filesys.rename(attachment_path, new_attachment_path)
             _addLogEntry(request, 'ATTDEL', pagename, attachment)
             _addLogEntry(request, 'ATTNEW', new_pagename, new_attachment)
@@ -1001,7 +1001,7 @@
 
 
         request.write(request.formatter.preformatted(1))
-        # If we have text but no colorizing parser we try to decode file contents. 
+        # If we have text but no colorizing parser we try to decode file contents.
         content = open(fpath, 'r').read()
         content = wikiutil.decodeUnknownInput(content)
         content = wikiutil.escape(content)
@@ -1029,7 +1029,7 @@
     macro.request = request
     macro.formatter = request.html_formatter
 
-    # use EmbedObject to view valid mime types 
+    # use EmbedObject to view valid mime types
     from MoinMoin.macro.EmbedObject import EmbedObject
     if mt is None:
         request.write('<p>' + _("Unknown file type, cannot display this attachment inline.") + '</p>')