Trapping MySQLdb warnings

Terry Reedy tjreedy at udel.edu
Thu Jun 16 15:40:32 EDT 2011


On 6/16/2011 3:01 PM, Tim Johnson wrote:
> * Terry Reedy<tjreedy at udel.edu>  [110616 10:50]:

>> The machinery in the warnings module is only for instances of
>> subsclasses of Warning. Are the warnings from MySQLdb properly such
>> objects? If so, what class are they?

>   The warnings are sent directly to stdout. No way that I know of to
>   find out what classes they are..

The doc for any python module 'should' tell you about custom exception 
and warning classes. Srinivas' says in his post MySQLdb.Exception and 
MySQLdb.Warning, which would be sensible.

-- 
Terry Jan Reedy




More information about the Python-list mailing list