Merge "Switch from MySQL-python to PyMySQL"

This commit is contained in:
Jenkins 2015-11-12 16:26:31 +00:00 committed by Gerrit Code Review
commit c700e99237
3 changed files with 7 additions and 7 deletions

View File

@ -26,7 +26,7 @@ import subprocess
from launchpadlib import launchpad
from launchpadlib import uris
import MySQLdb
import PyMySQL
from jeepyb import projects as p
@ -154,8 +154,8 @@ def main():
'Gerrit User Sync', uris.LPNET_SERVICE_ROOT, GERRIT_CACHE_DIR,
credentials_file=GERRIT_CREDENTIALS, version='devel')
conn = MySQLdb.connect(
host=DB_HOST, user=DB_USER, passwd=DB_PASS, db=DB_DB)
conn = PyMySQL.connect(
host=DB_HOST, user=DB_USER, password=DB_PASS, db=DB_DB)
find_specs(lpconn, conn, args)

View File

@ -53,9 +53,9 @@ def connect():
DB_DB = gerrit_config.get("database", "database")
if DB_TYPE.upper() == "MYSQL":
import MySQLdb
db_connection = MySQLdb.connect(
host=DB_HOST, user=DB_USER, passwd=DB_PASS, db=DB_DB)
import PyMySQL
db_connection = PyMySQL.connect(
host=DB_HOST, user=DB_USER, password=DB_PASS, db=DB_DB)
else:
import psycopg2
db_connection = psycopg2.connect(

View File

@ -2,7 +2,7 @@ pbr>=0.6,!=0.7,<1.0
argparse
gerritlib>=0.3.0
MySQL-python
PyMySQL
paramiko
PyGithub
pyyaml