changeset 4397:64d9d0f74a6a

SyncPages: improve code readability
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 29 Oct 2008 05:25:29 +0100
parents d53527e1264e
children 1c373ce7f3a4
files MoinMoin/action/SyncPages.py
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/SyncPages.py	Wed Oct 29 04:58:12 2008 +0100
+++ b/MoinMoin/action/SyncPages.py	Wed Oct 29 05:25:29 2008 +0100
@@ -74,17 +74,18 @@
         table = []
 
         for line in self.status:
-            if line[1]:
-                if line[2]:
-                    macro_args = [line[1]] + list(line[2])
+            level, message, substitutions, raw_suffix = line
+            if message:
+                if substitutions:
+                    macro_args = [message] + list(substitutions)
                     message = u"<<GetText2(|%s)>>" % (packLine(macro_args), )
                 else:
-                    message = u"<<GetText(%s)>>" % (line[1], )
+                    message = u"<<GetText(%s)>>" % (message, )
             else:
                 message = u""
-            table.append(table_line % {"smiley": line[0][1],
+            table.append(table_line % {"smiley": level[1],
                                        "message": message,
-                                       "raw_suffix": line[3].replace("\n", "<<BR>>")})
+                                       "raw_suffix": raw_suffix.replace("\n", "<<BR>>")})
 
         return "\n".join(table)