diff MoinMoin/macro/__init__.py @ 2546:56dbfbde79fe

better error checking in parameter parser, no more TypeError
author Johannes Berg <johannes AT sipsolutions DOT net>
date Mon, 23 Jul 2007 19:37:36 +0200
parents 5477d7f5ad64
children fb88a3706761
line wrap: on
line diff
--- a/MoinMoin/macro/__init__.py	Mon Jul 23 19:37:10 2007 +0200
+++ b/MoinMoin/macro/__init__.py	Mon Jul 23 19:37:36 2007 +0200
@@ -101,7 +101,7 @@
 
     def format_error(self, err):
         """ format an error object for output instead of normal macro output """
-        return self.formatter.text(u'[[%s: %s]]' % (self.name, unicode(err)))
+        return self.formatter.text(u'[[%s: %s]]' % (self.name, err.args[0]))
 
     def execute(self, macro_name, args):
         """ Get and execute a macro