changeset 4723:273ec9b3bf7d

remove dumpFormData debug stuff, use logging.debug/repr/etc.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 10 May 2009 19:52:46 +0200
parents d87cf99cd525
children 0817780f35d4 dffe83c636a7
files MoinMoin/action/dumpform.py MoinMoin/action/newaccount.py MoinMoin/userprefs/prefs.py MoinMoin/util/__init__.py
diffstat 4 files changed, 1 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/dumpform.py	Thu May 07 20:54:33 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-# -*- coding: iso-8859-1 -*-
-"""
-    MoinMoin - dump form data we received (debugging)
-
-    @copyright: 2000-2004 Juergen Hermann <jh@web.de>,
-                2006 MoinMoin:ThomasWaldmann
-    @license: GNU GPL, see COPYING for details.
-"""
-from MoinMoin import util
-
-def execute(pagename, request):
-    """ dump the form data we received in this request for debugging """
-    data = util.dumpFormData(request.form)
-
-    request.write("<html><body>%s</body></html>" % data)
-
--- a/MoinMoin/action/newaccount.py	Thu May 07 20:54:33 2009 +0200
+++ b/MoinMoin/action/newaccount.py	Sun May 10 19:52:46 2009 +0200
@@ -6,15 +6,13 @@
     @license: GNU GPL, see COPYING for details.
 """
 
-from MoinMoin import user, wikiutil, util
+from MoinMoin import user, wikiutil
 from MoinMoin.Page import Page
 from MoinMoin.widget import html
 from MoinMoin.security.textcha import TextCha
 from MoinMoin.auth import MoinAuth
 
 
-_debug = False
-
 def _create_user(request):
     _ = request.getText
     form = request.form
@@ -84,8 +82,6 @@
     theuser.save()
 
     result = _("User account created! You can use this account to login now...")
-    if _debug:
-        result = result + util.dumpFormData(form)
     return result
 
 
--- a/MoinMoin/userprefs/prefs.py	Thu May 07 20:54:33 2009 +0200
+++ b/MoinMoin/userprefs/prefs.py	Sun May 10 19:52:46 2009 +0200
@@ -25,8 +25,6 @@
 ####
 
 
-_debug = 0
-
 class Settings(UserPrefBase):
     def __init__(self, request):
         """ Initialize user settings form. """
@@ -219,8 +217,6 @@
             request.user.valid = False
 
         result = _("User preferences saved!")
-        if _debug:
-            result = result + util.dumpFormData(form)
         return result
 
 
--- a/MoinMoin/util/__init__.py	Thu May 07 20:54:33 2009 +0200
+++ b/MoinMoin/util/__init__.py	Sun May 10 19:52:46 2009 +0200
@@ -83,19 +83,6 @@
         return pattern[1:-1]
     return pattern[1:]
 
-def dumpFormData(form):
-    """ Dump the form data for debugging purposes
-    """
-    from MoinMoin import wikiutil
-
-    result = '<dt><strong>Form entries</strong></dt>'
-    for k in form:
-        v = form.get(k, ["<empty>"])
-        v = "|".join(v)
-        result = result + '<dd><em>%s</em>=%s</dd>' % (k, wikiutil.escape(v))
-
-    return result
-
 def IsWin9x():
     """ Returns true if run on Windows 95, 98 or ME. """
     if hasattr(sys, 'getwindowsversion'):