server/sqlutils.py
branchstable
changeset 4179 3a0b2f14e17b
parent 4177 f0ab2b6d3553
child 4195 86dcaf6bb92f
equal deleted inserted replaced
4178:0441165c7e59 4179:3a0b2f14e17b
   155             self.info('connecting to %s@%s for user %s', self.dbname,
   155             self.info('connecting to %s@%s for user %s', self.dbname,
   156                       self.dbhost or 'localhost', user or self.dbuser)
   156                       self.dbhost or 'localhost', user or self.dbuser)
   157         else:
   157         else:
   158             self.info('connecting to %s@%s', self.dbname,
   158             self.info('connecting to %s@%s', self.dbname,
   159                       self.dbhost or 'localhost')
   159                       self.dbhost or 'localhost')
       
   160         extra = {}
       
   161         if self.dbdriver_extra_args:
       
   162             extra = {'extra_args': self.dbdriver_extra_args}
   160         cnx = self.dbapi_module.connect(self.dbhost, self.dbname,
   163         cnx = self.dbapi_module.connect(self.dbhost, self.dbname,
   161                                         user or self.dbuser,
   164                                         user or self.dbuser,
   162                                         password or self.dbpasswd,
   165                                         password or self.dbpasswd,
   163                                         port=self.dbport,
   166                                         port=self.dbport,
   164                                         extra_args=self.dbdriver_extra_args)
   167                                         **extra)
   165         init_cnx(self.dbdriver, cnx)
   168         init_cnx(self.dbdriver, cnx)
   166         #self.dbapi_module.type_code_test(cnx.cursor())
   169         #self.dbapi_module.type_code_test(cnx.cursor())
   167         return cnx
   170         return cnx
   168 
   171 
   169     def backup_to_file(self, backupfile):
   172     def backup_to_file(self, backupfile):