#NEWLINE# def is_disconnect( self , e , connection , cursor ) : #NEWLINE# #INDENT# errnos = ( 2006 , 2013 , 2014 , 2045 , 2055 , 2048 ) #NEWLINE# exceptions = ( self . dbapi . OperationalError , self . dbapi . InterfaceError ) #NEWLINE# if isinstance ( self , exceptions ) : #NEWLINE# #INDENT# return ( ( e . errno in errnos ) or ( 'MySQL Connection not available.' in str ( e ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return False