diff MoinMoin/action/SyncPages.py @ 3414:898a544b8f74

make syncpages not crash on remote errors
author Johannes Berg <johannes AT sipsolutions DOT net>
date Sat, 22 Mar 2008 16:49:43 +0100
parents a1322262398a
children 60e0a3979520
line wrap: on
line diff
--- a/MoinMoin/action/SyncPages.py	Sat Mar 22 14:25:21 2008 +0100
+++ b/MoinMoin/action/SyncPages.py	Sat Mar 22 16:49:43 2008 +0100
@@ -189,7 +189,7 @@
             try:
                 remote = MoinRemoteWiki(self.request, params["remoteWiki"], params["remotePrefix"], params["pageList"], params["user"], params["password"], verbose=debug)
             except (UnsupportedWikiException, NotAllowedException), (msg, ):
-                raise ActionStatus(msg)
+                raise ActionStatus(msg, "error")
 
             if not remote.valid:
                 raise ActionStatus(_("The ''remoteWiki'' is unknown.", wiki=True), "error")
@@ -197,7 +197,7 @@
             if params["user"] and not params["password"]:
                 return self.show_password_form()
         except ActionStatus, e:
-            self.request.theme.add_msg(u'<p class="error">%s</p>\n' % (e.args[0], ), e.args[1])
+            self.request.theme.add_msg(*e.args)
         else:
             try:
                 try: