# HG changeset patch # User Aurelien Campeas # Date 1261485804 -3600 # Node ID 3a0b2f14e17b96daf7a90ee118a50cc853cf2421 # Parent 0441165c7e59d6e97341127b0446c0ed9804030b only give extra_args if there is something to be fed (breaks some db connectors otherwise) diff -r 0441165c7e59 -r 3a0b2f14e17b server/sqlutils.py --- a/server/sqlutils.py Tue Dec 22 11:07:07 2009 +0100 +++ b/server/sqlutils.py Tue Dec 22 13:43:24 2009 +0100 @@ -157,11 +157,14 @@ else: self.info('connecting to %s@%s', self.dbname, self.dbhost or 'localhost') + extra = {} + if self.dbdriver_extra_args: + extra = {'extra_args': self.dbdriver_extra_args} cnx = self.dbapi_module.connect(self.dbhost, self.dbname, user or self.dbuser, password or self.dbpasswd, port=self.dbport, - extra_args=self.dbdriver_extra_args) + **extra) init_cnx(self.dbdriver, cnx) #self.dbapi_module.type_code_test(cnx.cursor()) return cnx