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:
parent
6ac1fc84d7
commit
d8f0d3a6d6
|
@ -26,7 +26,7 @@ import subprocess
|
||||||
|
|
||||||
from launchpadlib import launchpad
|
from launchpadlib import launchpad
|
||||||
from launchpadlib import uris
|
from launchpadlib import uris
|
||||||
import MySQLdb
|
import PyMySQL
|
||||||
|
|
||||||
from jeepyb import projects as p
|
from jeepyb import projects as p
|
||||||
|
|
||||||
|
@ -154,8 +154,8 @@ def main():
|
||||||
'Gerrit User Sync', uris.LPNET_SERVICE_ROOT, GERRIT_CACHE_DIR,
|
'Gerrit User Sync', uris.LPNET_SERVICE_ROOT, GERRIT_CACHE_DIR,
|
||||||
credentials_file=GERRIT_CREDENTIALS, version='devel')
|
credentials_file=GERRIT_CREDENTIALS, version='devel')
|
||||||
|
|
||||||
conn = MySQLdb.connect(
|
conn = PyMySQL.connect(
|
||||||
host=DB_HOST, user=DB_USER, passwd=DB_PASS, db=DB_DB)
|
host=DB_HOST, user=DB_USER, password=DB_PASS, db=DB_DB)
|
||||||
|
|
||||||
find_specs(lpconn, conn, args)
|
find_specs(lpconn, conn, args)
|
||||||
|
|
||||||
|
|
|
@ -53,9 +53,9 @@ def connect():
|
||||||
DB_DB = gerrit_config.get("database", "database")
|
DB_DB = gerrit_config.get("database", "database")
|
||||||
|
|
||||||
if DB_TYPE.upper() == "MYSQL":
|
if DB_TYPE.upper() == "MYSQL":
|
||||||
import MySQLdb
|
import PyMySQL
|
||||||
db_connection = MySQLdb.connect(
|
db_connection = PyMySQL.connect(
|
||||||
host=DB_HOST, user=DB_USER, passwd=DB_PASS, db=DB_DB)
|
host=DB_HOST, user=DB_USER, password=DB_PASS, db=DB_DB)
|
||||||
else:
|
else:
|
||||||
import psycopg2
|
import psycopg2
|
||||||
db_connection = psycopg2.connect(
|
db_connection = psycopg2.connect(
|
||||||
|
|
|
@ -2,7 +2,7 @@ pbr>=0.6,!=0.7,<1.0
|
||||||
|
|
||||||
argparse
|
argparse
|
||||||
gerritlib>=0.3.0
|
gerritlib>=0.3.0
|
||||||
MySQL-python
|
PyMySQL
|
||||||
paramiko
|
paramiko
|
||||||
PyGithub
|
PyGithub
|
||||||
pyyaml
|
pyyaml
|
||||||
|
|
Loading…
Reference in New Issue