Re: [Tutor] Trapping warnings from MySQLdb

2009-04-13 Thread Tim Johnson
On Monday 13 April 2009, Kent Johnson wrote: <> > >From a quick look at MySQLdb-1.2.2, it seems to be using the python > > std lib module warnings to report warnings. > http://docs.python.org/library/warnings.html > > >From the warnings docs, it seems like warnings.simplefilter() is what > > yo

Re: [Tutor] Trapping warnings from MySQLdb

2009-04-13 Thread Kent Johnson
On Mon, Apr 13, 2009 at 7:22 PM, Tim Johnson wrote: > FYI: Using python 2.5 with the MySQLdb module. > I need to be able to raise an exeception on a MySQL warning. > > I have used my own class for years that wraps the MySQLdb module, > but never did build in a feature that would let me 'tell' my c

[Tutor] Trapping warnings from MySQLdb

2009-04-13 Thread Tim Johnson
FYI: Using python 2.5 with the MySQLdb module. I need to be able to raise an exeception on a MySQL warning. I have used my own class for years that wraps the MySQLdb module, but never did build in a feature that would let me 'tell' my class instances to raise an except for a warning: Example: I'm