diff --git a/cgi-bin/webnotes/__init__.py b/cgi-bin/webnotes/__init__.py index 551a719af8..2dcc8e4748 100644 --- a/cgi-bin/webnotes/__init__.py +++ b/cgi-bin/webnotes/__init__.py @@ -94,10 +94,13 @@ def errprint(msg): """ debug_log.append(cstr(msg or '')) -def msgprint(msg, small=0, raise_exception=0): +def msgprint(msg, small=0, raise_exception=0, as_table=False): """ Append to the :data:`message_log` """ + if as_table and type(msg) in (list, tuple): + msg = '
| %s | ' % c for c in r])+'