sqlExport: Read membershipworks database info from passwords.py file

This commit is contained in:
Adam Goldsmith 2020-02-25 15:27:08 -05:00
parent 516813b895
commit a6e596cfd4

View File

@ -5,6 +5,7 @@ import MySQLdb
import yaml import yaml
from common import membershipworks from common import membershipworks
from passwords import MEMBERSHIPWORKS_DB
def insertFromTableMap(table, data, tableMap): def insertFromTableMap(table, data, tableMap):
@ -49,7 +50,7 @@ with open('tableMapping.yaml') as f:
tableMapping = yaml.load(f, yaml.SafeLoader) tableMapping = yaml.load(f, yaml.SafeLoader)
conn = MySQLdb.connect(user='membershipworks', password='asdf', database='membershipworks') conn = MySQLdb.connect(**MEMBERSHIPWORKS_DB)
c = conn.cursor() c = conn.cursor()
def createDefinitionsFromTableMap(tableMap): def createDefinitionsFromTableMap(tableMap):