I think it was fixed already, I reported the same issue quite a long time ago
http://groups.google.com/group/webpy/browse_thread/thread/178748dffef5f6dd/a996459ad39f69b5 On Oct 28, 12:18 pm, Anand Chitipothu <[email protected]> wrote: > On Wed, Oct 28, 2009 at 2:43 PM, Zhang Huangbin <[email protected]> > wrote: > > > On Oct 28, 4:34 pm, Anand Chitipothu <[email protected]> wrote: > >> The correct code should probably be this: > > >> def load_sqla(handler): > >> web.ctx.orm = scoped_session(sessionmaker(bind=engine)) > >> try: > >> return handler() > >> except web.HTTPError: > >> web.ctx.orm.commit() > >> raise > >> except: > >> web.ctx.orm.rollback() > >> raise > >> else: > >> web.ctx.orm.commit() > > > I think you're right. But i can't contact original author of this > > article to update it. > > I think its fine to correct mistakes in the cookbook example. Please > go ahead and fix it. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" 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/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
