Merge remote-tracking branch 'origin/pr/148'

Conflicts:
	pymysql/connections.py
	pymysql/cursors.py
This commit is contained in:
INADA Naoki
2013-09-23 10:56:38 +09:00
5 changed files with 7 additions and 7 deletions

View File

@@ -548,7 +548,7 @@ class Connection(object):
def _config(key, default):
try:
return cfg.get(read_default_group,key)
except:
except Exception:
return default
user = _config("user",user)

View File

@@ -55,7 +55,7 @@ class Cursor(object):
try:
while self.nextset():
pass
except:
except Exception:
pass
self.connection = None
@@ -324,7 +324,7 @@ class SSCursor(Cursor):
try:
if self._has_next:
while self.nextset(): pass
except: pass
except Exception: pass
def _query(self, q):
conn = self._get_db()

View File

@@ -3,7 +3,7 @@ import sys
try:
from pymysql.tests import base
import pymysql.cursors
except:
except Exception:
# For local testing from top-level directory, without installing
sys.path.append('../pymysql')
from pymysql.tests import base

View File

@@ -159,7 +159,7 @@ class TestNewIssues(base.PyMySQLTestCase):
self.fail()
except pymysql.OperationalError as e:
self.assertEqual(2003, e.args[0])
except:
except Exception:
self.fail()
def test_issue_33(self):
@@ -202,7 +202,7 @@ class TestNewIssues(base.PyMySQLTestCase):
try:
c.execute("show tables")
self.fail()
except:
except Exception:
pass
# check the process list from the other connection
try:

View File

@@ -52,7 +52,7 @@ class DatabaseTest(unittest.TestCase):
def table_exists(self, name):
try:
self.cursor.execute('select * from %s where 1=0' % name)
except:
except Exception:
return False
else:
return True