>
>
> My Code
> ==================================================
> try:
>        orm.flush()
>        orm.commit()
> except Exception, e :
>        orm.rollback()  # Rollback transaction
>        # Release all connections and expunge objects
>        # Don't allow any other code to use session, full of bad data
>        orm.remove()
>        return Fault(30, 'Could not insert rows.')
> return 'OK'
>

Shouldn't that orm.remove() call be placed into a finally: clause?  As
written, you aren't removing it unless there is an exception.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to