changeset 1:33d03349c532

small fixes for comments, separate import for Image
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Fri, 07 Mar 2008 16:29:46 +0100
parents d164d12d06b8
children 0ba5fff49070
files data/plugin/action/arnica_slides.py data/plugin/parser/text_x_arnica.py
diffstat 2 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/arnica_slides.py	Fri Mar 07 15:48:15 2008 +0100
+++ b/data/plugin/action/arnica_slides.py	Fri Mar 07 16:29:46 2008 +0100
@@ -53,6 +53,7 @@
         @attachment_path: path to attachment
         """
         url = AttachFile.getAttachUrl(pagename, '', request)
+        # xxx fix this at the right place!
         url = url.replace('//', '/')
         return attachment_path, url
 
@@ -407,10 +408,10 @@
             msg = None
 
         elif command == 'BS':
-            msg = "gone back" #None
+            msg = "gone back" 
 
         elif request.user.may.delete(pagename):
-        # only users which are allowed to delete sould use this tools
+        # only users which are allowed to delete should use this tool
 
             target = request.form.get('target', [''])[0]
             filename, ext = os.path.splitext(target)
--- a/data/plugin/parser/text_x_arnica.py	Fri Mar 07 15:48:15 2008 +0100
+++ b/data/plugin/parser/text_x_arnica.py	Fri Mar 07 16:29:46 2008 +0100
@@ -73,13 +73,18 @@
 """
 Dependencies = ['time'] # do not cache
 
-import os, re, Image
+import os, re
 from random import randint
 from MoinMoin import wikiutil
 from MoinMoin.action import AttachFile
 from MoinMoin.Page import Page
 from MoinMoin.filter import EXIF
 
+try:
+    import Image
+except ImportError:
+    Image = None
+
 class Parser:
     extensions = '*.jpg'
     def __init__(self, raw, request, **kw):
@@ -408,7 +413,6 @@
         @param text: text to parse and render
         """
         text = ''.join(text)
-        text = text.replace('\\n', '\n')
         from MoinMoin.parser.text_moin_wiki import Parser
         return wikiutil.renderText(self.request, Parser, text, line_anchors=False)