#NEWLINE# def __exit__( self , exc_type , exc_value , traceback ) : #NEWLINE# #INDENT# '\n        End a context.\n\n         -  If there was no exception, commit up to the current high-water mark.\n         -  If there was an offset of range error, attempt to find the correct\n            initial offset.\n         -  If there was any other error, roll back to the initial offsets.\n        ' #NEWLINE# if ( exc_type is None ) : #NEWLINE# #INDENT# self . commit ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( exc_value , OffsetOutOfRangeError ) : #NEWLINE# #INDENT# self . handle_out_of_range ( ) #NEWLINE# return True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . rollback ( )