witten
/
luminotes
Archived
1
0
Fork 0

Apparently get_transaction_status() was introduced in psycopg 2.0.6. :(

This commit is contained in:
Dan Helfman 2008-03-17 23:10:14 +00:00
parent 456160a3a2
commit 0754a0b4bb
1 changed files with 1 additions and 4 deletions

View File

@ -123,10 +123,7 @@ class Database( object ):
def rollback( self ):
connection = self.__get_connection()
# if a transaction has begun but not completed, then rollback the current transaction
if connection.get_transaction_status() > 0:
connection.rollback()
connection.rollback()
def load( self, Object_type, object_id, revision = None ):
"""