Package MySQLdb :: Module connections
[hide private]
[frames] | no frames]

Module connections

source code

This module implements connections for MySQLdb. Presently there is only one class: Connection. Others are unlikely. However, you might want to make your own subclasses. In most cases, you will probably override Connection.default_cursor with a non-standard Cursor class.

Classes [hide private]
  Connection
MySQL Database Connection Object
Functions [hide private]
 
defaulterrorhandler(connection, cursor, errorclass, errorvalue)
If cursor is not None, (errorclass, errorvalue) is appended to cursor.messages; otherwise it is appended to connection.messages.
source code
Function Details [hide private]

defaulterrorhandler(connection, cursor, errorclass, errorvalue)

source code 

If cursor is not None, (errorclass, errorvalue) is appended to cursor.messages; otherwise it is appended to connection.messages. Then errorclass is raised with errorvalue as the value.

You can override this with your own error handler by assigning it to the instance.