Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #7762 > unrolled thread
| Started by | Tim Johnson <tim@johnsons-web.com> |
|---|---|
| First post | 2011-06-16 11:13 -0800 |
| Last post | 2011-06-16 11:13 -0800 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Trapping MySQLdb warnings Tim Johnson <tim@johnsons-web.com> - 2011-06-16 11:13 -0800
| From | Tim Johnson <tim@johnsons-web.com> |
|---|---|
| Date | 2011-06-16 11:13 -0800 |
| Subject | Re: Trapping MySQLdb warnings |
| Message-ID | <mailman.36.1308251593.1164.python-list@python.org> |
* Terry Reedy <tjreedy@udel.edu> [110616 10:50]:
<...>
> Substitute specific MySQLdb warning class, whatever it is, for Warning.
Hmm! Consider the following code:
try :
self.__rdb.execute(S)
raise MySQLdb.Warning('danger, danger Monte Python') ## just for grins
except MySQLdb.Warning,e:
std.debug("e",e,0,0,'mysql.py:195',0) ## DEBUG GLOBAL
## result:
INSPECTING `e' (F:mysql.py:195):
danger, danger Monte Python
## Question:
Am I initializing the cursor to raise warnings? I *so* rusty at this, but I
suspect that something needs to be done with either the instantiation of the
'parent' connection object or the cursor object itself.
--
Tim
tim at johnsons-web dot com or akwebsoft dot com
http://www.akwebsoft.com
Back to top | Article view | comp.lang.python
csiph-web