Message1796
Logged In: YES
user_id=547942
I have been searching the docs, and just noticed that the
MySQLdb.connect function will do the config file reading
*if* it is passed either a read_default_file or
read_default_group option. Unfortunately, those options are
the last two specified for the function. This can be done
in the config file by setting:
MYSQL_DATABASE = ( MYSQL_DBHOST, MYSQL_DBUSER,
MYSQL_DBPASSWORD, MYSQL_DBNAME, None, None, None, None,
None, None, None, None, 'roundup' )
Since all those Nones are easy to mess up (easy to get the
wrong numberor the API for MySQLdb.connect could change),
you could make MYSQL_DATABASE be a dictionary, and drop the
other MYSQL_* configuration options:
MYSQL_DATABASE = {
host:'localhost',
user:'roundup',
passwd:'asdhfakshdfk',
db:'roundup',
read_default_group:'roundup',
}
I'll work on a patch to allow for this. The most important
part, however, is that all the connects need to use the same
options (right now only one of them uses MYSQL_DATABASE, the
rest all break). |
|
Date |
User |
Action |
Args |
2009-02-03 14:21:07 | admin | link | issue1096031 messages |
2009-02-03 14:21:07 | admin | create | |
|