diff MoinMoin/action/SyncPages.py @ 4398:1c373ce7f3a4

SyncPages: add workaround for callers calling log_status with encoded bytestrings
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 29 Oct 2008 05:46:36 +0100
parents 64d9d0f74a6a
children b1116a99d62b 5359bfdf91ba
line wrap: on
line diff
--- a/MoinMoin/action/SyncPages.py	Wed Oct 29 05:25:29 2008 +0100
+++ b/MoinMoin/action/SyncPages.py	Wed Oct 29 05:46:36 2008 +0100
@@ -46,8 +46,12 @@
         self.status = []
         self.rollback = set()
 
-    def log_status(self, level, message="", substitutions=(), raw_suffix=""):
+    def log_status(self, level, message=u"", substitutions=(), raw_suffix=u""):
         """ Appends the message with a given importance level to the internal log. """
+        if isinstance(message, str):
+            message = message.decode("utf-8")
+        if isinstance(raw_suffix, str):
+            raw_suffix = raw_suffix.decode("utf-8")
         self.status.append((level, message, substitutions, raw_suffix))
 
     def register_rollback(self, func):