From f5b09103e26cd72cc74600e3cf0f95c9a4f02f2f Mon Sep 17 00:00:00 2001 From: pengtao Date: Mon, 30 Sep 2019 10:38:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mysql/mmysql.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mysql/mmysql.py b/mysql/mmysql.py index e4b3f4a..b481676 100644 --- a/mysql/mmysql.py +++ b/mysql/mmysql.py @@ -13,7 +13,7 @@ usage: m = mysqlBase(host='xxx',db='xxx',user='xxx',pwd='xxx') 实例化 m.query("select * from core") """ import warnings - +import pdb try: import MySQLdb except: @@ -143,8 +143,9 @@ class MysqlBase: res = '' try: self.curs.execute(sql) - res = self.curs.fetchall() # log.info('%s query ' % sql) - + pdb.set_trace() + res = self.curs.fetchall() + log.info('%s query ' % sql) except: log.error('%s query error' % sql)