changeset 3510:50c2b537a089

make sane default arg to theme.add_msg()
author Johannes Berg <johannes AT sipsolutions DOT net>
date Sat, 19 Apr 2008 10:54:02 +0200
parents da1d5a2165f5
children d2eddbbe24ca
files MoinMoin/theme/__init__.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/theme/__init__.py	Tue Apr 15 21:17:35 2008 +0200
+++ b/MoinMoin/theme/__init__.py	Sat Apr 19 10:54:02 2008 +0200
@@ -1475,13 +1475,15 @@
         lang = self.request.content_lang
         return ' lang="%s" dir="%s"' % (lang, i18n.getDirection(lang))
 
-    def add_msg(self, msg, msg_class="dialog"):
+    def add_msg(self, msg, msg_class=None):
         """ Adds a message to a list which will be used to generate status
         information.
 
         @param msg: additional message
         @param msg_class: html class for the div of the additional message.
         """
+        if not msg_class:
+            msg_class = 'dialog'
         if self._send_title_called:
             raise Exception("You cannot call add_msg() after send_title()")
         self._status.append((msg, msg_class))