changeset 424:0b400626bc93

rev converter: misc src cosmetics
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 08 Aug 2011 02:31:44 +0200
parents 6119699cec2f
children 8589afef0e6c
files MoinMoin/search/revision_converter.py
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/search/revision_converter.py	Mon Aug 08 02:28:51 2011 +0200
+++ b/MoinMoin/search/revision_converter.py	Mon Aug 08 02:31:44 2011 +0200
@@ -2,10 +2,7 @@
 # License: GNU GPL v2 (or any later version), see LICENSE.txt for details.
 
 """
-    MoinMoin - Backend to whoosh revision converter
-
-    Use that for convertion MoinMoin backend revision
-    to whoosh revision
+MoinMoin - Backend revision to whoosh revision converter
 """
 
 
@@ -20,15 +17,16 @@
     :param backend_rev: MoinMoin backend revision
     :param rev_no: Revision number
     :param schema_fields: list with whoosh schema fields
-    :returns: Whoosh indexed document
+    :returns: document to put into whoosh index
     """
 
     doc = dict([(str(key), value)
-                      for key, value in backend_rev.items()
-                      if key in schema_fields])
+                for key, value in backend_rev.items()
+                if key in schema_fields])
     doc[MTIME] = datetime.datetime.fromtimestamp(backend_rev[MTIME])
     doc["name_exact"] = backend_rev[NAME]
     doc["rev_no"] = rev_no
     doc["wikiname"] = wikiname
     doc["content"] = content
     return doc
+