Lynn Rees committed d37a0d4


  • Participants
  • Parent commits bb7df25
  • Branches wsgiform
  • Tags svn.17

Comments (0)

Files changed (1)

File branches/0.2.5/wsgiform/

     _keys = {'fieldstorage':'wsgiform.fieldstorage', 'dict':'wsgiform.dict',
         'kwargs':'wsgize.kwargs', 'environ':'wsgiform.%s',
-    _funclist = {'escape':escapeform, 'hyperescape':hyperform, 'sterilize':sterileform} 
+    _funclist = {'escape':escapeform, 'hyperescape':hyperform,
+        'sterilize':sterileform} 
     def __init__(self, app, **kw):
         '''@param app WSGI callable
         # Function to handle form validation errors
         self._errorhandler = kw.get('errapp', self._errorapp)
-    def __call__(self, env, start_return):
+    def __call__(self, env, start_response):
         '''Call function.'''
         # Return fieldstorage
             qdict, self._environ = self._func(env, self._strict), env
             if self._validators and not self._validate(qdict):
-                return self._errorhandler(env, start_return)                    
+                return self._errorhandler(env, start_response)                    
             # Make individual environ entries
             if self._style == 'environ':
                 for k, v in qdict.iteritems(): env[self._key % k] = v
             # Make kwargs or dict
                 env[self._key] = qdict
-        return self._app(env, start_return)    
+        return self._app(env, start_response)    
     def _validate(self, qdict):
         '''Validates form data.
             except KeyError: pass
         return True
-    def _errorapp(self, environ, start_return):
+    def _errorapp(self, environ, start_response):
         '''Simple error handler for form validation errors.'''
-        start_return('200 OK', ('Content-type', 'text/plain'))
+        start_response('200 OK', ('Content-type', 'text/plain'))
         return ['Data in field %s was invalid.' % environ['wsgiform.error']]