[google-appengine] Re: check if in transaction?

2008-09-01 Thread dobee
On Sep 2, 1:17 am, ryan <[EMAIL PROTECTED]> wrote: > having said that, the python API already detects and prohibits nested > transactions. from the beginning of RunInTransaction() in > datastore.py: > >   if _CurrentTransactionKey(): >     raise datastore_errors.BadRequestError( >       'Nested

[google-appengine] Re: check if in transaction?

2008-09-01 Thread ryan
yes, _CurrentTransactionKey() will do what you want. it's undocumented, though, and not considered part of the public API, hence the leading underscore. given that, we might change it at any time. unlikely, but possible. having said that, the python API already detects and prohibits nested transa