Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #7763

Re: Trapping MySQLdb warnings

From Terry Reedy <tjreedy@udel.edu>
Subject Re: Trapping MySQLdb warnings
Date 2011-06-16 15:40 -0400
References (1 earlier) <BANLkTint8YP9W7hUnvYh4nmMo_6h0WPXTA@mail.gmail.com> <20110616023829.GB1885@johnsons-web.com> <20110616155533.GD1885@johnsons-web.com> <itdj4h$mrn$1@dough.gmane.org> <20110616190106.GG1885@johnsons-web.com>
Newsgroups comp.lang.python
Message-ID <mailman.37.1308253249.1164.python-list@python.org> (permalink)

Show all headers | View raw


On 6/16/2011 3:01 PM, Tim Johnson wrote:
> * Terry Reedy<tjreedy@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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Trapping MySQLdb warnings Terry Reedy <tjreedy@udel.edu> - 2011-06-16 15:40 -0400

csiph-web