Switch from MySQL-python to PyMySQL

For the same reason nodepool switched[1], let's switch jeepyb too.

[1] http://git.openstack.org/cgit/openstack-infra/nodepool/commit/?id=63e5297f7e56bd2f8ca8c16e1f1b032f6c6f5ab8

Change-Id: I3afeaebeb8416388d5866fc3994357935079c97d
This commit is contained in:
Colleen Murphy 2015-10-14 13:57:43 -07:00
parent 6ac1fc84d7
commit d8f0d3a6d6
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