Skip to content

Commit cfd3008

Browse files
committed
Use PyMySQL for MySQL commands
1 parent 6b54038 commit cfd3008

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

seleniumbase/core/mysql.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ def __init__(self, database_env='test', conf_creds=None):
1515
"""
1616
Gets database information from mysql_conf.py and creates a connection.
1717
"""
18-
import MySQLdb
18+
import pymysql
1919
db_server, db_user, db_pass, db_schema = \
2020
conf.APP_CREDS[conf.Apps.TESTCASE_REPOSITORY][database_env]
2121
retry_count = 3
2222
backoff = 1.2 # Time to wait (in seconds) between retries.
2323
count = 0
2424
while count < retry_count:
2525
try:
26-
self.conn = MySQLdb.connect(host=db_server,
26+
self.conn = pymysql.connect(host=db_server,
2727
user=db_user,
2828
passwd=db_pass,
2929
db=db_schema)

0 commit comments

Comments
 (0)