At 12:05 PM 11/10/2007 -0600, Ian Bicking wrote: >Jochen Kupperschmidt wrote: > > Hi Ian, > > > > when using your Paste suite and its HTTP server, I sporadically come > > across a traceback related to a GeneratorExit. It does not seem to break > > stuff, but it confuses me and fills up my log. > > > > I put the traceback, together with some description and related links > > that might help examining and fixing it, at > > http://paste.pocoo.org/show/9976/ > > It should be easy to fix, as far as I can tell. Please let me know what > > you think. > >I'm guessing this is some interaction between the extensions to the >generator protocol in Python 2.5, and its overlap with app_iter.close() >in WSGI. I'm not sure what the proper behavior here is. Just swallow >the error? Maybe PJE has an idea of what should happen here.
What should happen here is that the person who wrote the generator such that it catches and ignores GeneratorExit needs to fix it. The error shown in that traceback is: "RuntimeError: generator ignored GeneratorExit" Which means it's the generator that's broken. It's presumably got a try/except block that either doesn't re-raise the error, or that contains a yield. _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com