I'm seeing an issue where calling start_response under Linux when
using an WSGI callable returns None. The same code runs fine under
Windows with the same version of all modules. Does anybody have any
idea why?
Pylons: failes with both 0.9.6.2 and 0.9.7rc2
class TracWsgiController(BaseController):
def __init__(self):
# set application to the trac WSGI dispatch_request function
self.app = dispatch_request
self.trac_env_path = config['trac_env_path']
def __call__(self, environ, start_response):
"""Dispatches request to trac."""
environ['trac.env_path'] = self.trac_env_path
# pass request directly to trac and return a response
generator
# THIS FAILS since calling start_response returns None
app_iter = self.app(environ, start_response)
def generator():
for item in app_iter:
yield item
if hasattr(app_iter, 'close'):
app_iter.close()
return generator()
Traceback of the error:
File "/usr/local/lib/python2.5/site-packages/trac/web/main.py", line
430, in dispatch_request
req.send_error(sys.exc_info(), status=500)
File "/usr/local/lib/python2.5/site-packages/trac/web/api.py", line
397, in send_error
self.write(data)
File "/usr/local/lib/python2.5/site-packages/trac/web/api.py", line
460, in write
self._write(data)
TypeError: 'NoneType' object is not callable
Thanks,
Eric
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---