Alexey, you did an excellent job at identifying the problem. I will
look at your solutions and probably incorporate them.

Massimo

On Jun 7, 5:51 am, Alexey Nezhdanov <[email protected]> wrote:
> On Sunday 07 June 2009 14:36:24 Iceberg wrote:> > Hmm. Tried this:
> > >         if args['migrate']:
> > >           sql_locker.acquire()
> > >           try:
> > >             query = t._create(migrate=args['migrate'])
> > >           except BaseException, e:
> > >             sql_locker.release()
> > >             raise e
> > >           sql_locker.release()
> > Just a remind. The try...except clause above should better change into
> > this one.
>
> That's reminder to Massimo :) In that code sample I have only one line (if:)
> everything other was there before me.
>
> >   try:
> >     query=t._create(...)
> >   finally:
> >     sql_locker.release()
> > Only in this way, any exception (if any) inside t._create(...) can
> > show its correct break point, rather than the line "raise e".
>
> yes, and even better would be
> with sql_locker:
>     query=....
> just two lines - instead of 5 with the same breakpoint benefit.
> On the other hand - it requires doing
> from __future__ import with_statement
> and that WILL break python 2.4 compartibility once again.
>
> --
> Sincerely yours
> Alexey Nezhdanov
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to