Apparently get_transaction_status() was introduced in psycopg 2.0.6. :(
This commit is contained in:
parent
456160a3a2
commit
0754a0b4bb
|
@ -123,10 +123,7 @@ class Database( object ):
|
||||||
|
|
||||||
def rollback( self ):
|
def rollback( self ):
|
||||||
connection = self.__get_connection()
|
connection = self.__get_connection()
|
||||||
|
connection.rollback()
|
||||||
# if a transaction has begun but not completed, then rollback the current transaction
|
|
||||||
if connection.get_transaction_status() > 0:
|
|
||||||
connection.rollback()
|
|
||||||
|
|
||||||
def load( self, Object_type, object_id, revision = None ):
|
def load( self, Object_type, object_id, revision = None ):
|
||||||
"""
|
"""
|
||||||
|
|
Reference in New Issue