Created
July 28, 2010 15:24
-
-
Save reidrac/494879 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
args = { | |
'db': connect['database'], | |
'user': connect['username'], | |
'passwd': connect['password'], | |
} | |
if 'hostname' in connect: | |
# hostname implies port (although it can be default) | |
args['host'] = connect['hostname'] | |
args['port'] = connect['port'] | |
self._db = MySQLdb.connect(**args) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment