* Tim Johnson t...@johnsons-web.com [110615 18:53]:
* geremy condra debat...@gmail.com [110615 18:03]:
On Wed, Jun 15, 2011 at 6:58 PM, Tim Johnson t...@johnsons-web.com wrote:
Using Python 2.6.5 on linux.
When using MySQLdb I am getting warnings printed to stdout, but I would
like
On 6/16/2011 11:55 AM, Tim Johnson wrote:
* Tim Johnsont...@johnsons-web.com [110615 18:53]:
* geremy condradebat...@gmail.com [110615 18:03]:
On Wed, Jun 15, 2011 at 6:58 PM, Tim Johnsont...@johnsons-web.com wrote:
Using Python 2.6.5 on linux.
When using MySQLdb I am getting warnings
Hi Tim,
Use this method it will sort tour problem.
def do_query(insert_query):
import warnings
with warnings.catch_warnings():
warnings.simplefilter('error', MySQLdb.Warning)
try:
cursor.execute(insert_query)
conn.commit()
return 'Success'
except MySQLdb.Error,
* Terry Reedy tjre...@udel.edu [110616 10:50]:
On 6/16/2011 11:55 AM, Tim Johnson wrote:
* Tim Johnsont...@johnsons-web.com [110615 18:53]:
* geremy condradebat...@gmail.com [110615 18:03]:
On Wed, Jun 15, 2011 at 6:58 PM, Tim Johnsont...@johnsons-web.com wrote:
Using Python 2.6.5 on
* Terry Reedy tjre...@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:
On 6/16/2011 3:01 PM, Tim Johnson wrote:
* Terry Reedytjre...@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
* srinivas hn hnsr...@gmail.com [110616 11:06]:
Hi Tim,
Use this method it will sort tour problem.
def do_query(insert_query):
import warnings
with warnings.catch_warnings():
warnings.simplefilter('error', MySQLdb.Warning)
try:
cursor.execute(insert_query)
* srinivas hn hnsr...@gmail.com [110616 11:06]:
Hi Tim,
import warnings
with warnings.catch_warnings():
warnings.simplefilter('error', MySQLdb.Warning)
try:
cursor.execute(insert_query)
conn.commit()
return 'Success'
except MySQLdb.Error, error:
Using Python 2.6.5 on linux.
When using MySQLdb I am getting warnings printed to stdout, but I would
like to trap, display and log those warnings.
In the past I have used _mysql_exceptions.Warning, but that approach
is not working in this case.
My cursor is created with the relevant following
On Wed, Jun 15, 2011 at 6:58 PM, Tim Johnson t...@johnsons-web.com wrote:
Using Python 2.6.5 on linux.
When using MySQLdb I am getting warnings printed to stdout, but I would
like to trap, display and log those warnings.
In the past I have used _mysql_exceptions.Warning, but that approach
* geremy condra debat...@gmail.com [110615 18:03]:
On Wed, Jun 15, 2011 at 6:58 PM, Tim Johnson t...@johnsons-web.com wrote:
Using Python 2.6.5 on linux.
When using MySQLdb I am getting warnings printed to stdout, but I would
like to trap, display and log those warnings.
.
Have you
11 matches
Mail list logo