a better attempt at making unicode DB connections
This commit is contained in:
parent
ccbea5ecdb
commit
b375a5a049
|
@ -208,7 +208,8 @@ class Module(object):
|
|||
dbuser = self.config.get('dr.botzo', 'dbuser')
|
||||
dbpass = self.config.get('dr.botzo', 'dbpass')
|
||||
dbname = self.config.get('dr.botzo', 'dbname')
|
||||
db = mdb.connect(dbhost, dbuser, dbpass, dbname, use_unicode=True)
|
||||
db = mdb.connect(dbhost, dbuser, dbpass, dbname, charset='utf8',
|
||||
use_unicode=True)
|
||||
|
||||
return db
|
||||
|
||||
|
|
|
@ -60,7 +60,8 @@ try:
|
|||
dbuser = config.get('dr.botzo', 'dbuser')
|
||||
dbpass = config.get('dr.botzo', 'dbpass')
|
||||
dbname = config.get('dr.botzo', 'dbname')
|
||||
db = mdb.connect(dbhost, dbuser, dbpass, dbname, use_unicode=True)
|
||||
db = mdb.connect(dbhost, dbuser, dbpass, dbname, charset='utf8',
|
||||
use_unicode=True)
|
||||
try:
|
||||
cur = db.cursor()
|
||||
# need to create the drbotzo_modules table if it doesn't exist
|
||||
|
|
Loading…
Reference in New Issue